I have created an array as:
//$field = "email";
//$value = "text";
$structure[$field] = $value;
$structure gets passed to a function that uses a for() loop to work through a process and in this process I need to extract the key/value pair
for($i=0; $i<$cntFields; $i++) {
$a = $structure[$i][0];
$b = $structure[$i][1];
echo "Field = $a / Value = $b<br>\n";
// at this point I need the following:
// $a should = "email"
// $b should = "text"
}
For some reason, when I run the code in the for(), $a and $b come up as empty so how do I reference these by their numerical index instead of their named index? Do I need to create the original array differently?
Thanks!
Pete