Howdy... 🙂
I have this array $x which has five fields in it... (Please correct me if I am not using the right term...)
<?php
$x = array("a" => array("a1","a2","a3")
,"b" => array("b1","b2")
,"c" => array("c1","c2","c3")
,"d" => array("d1","d2","d3")
,"e" => array("e1")
);
foreach ($x as $key)
{
echo '<li>' . $key;
foreach ($key as $subkey)
{
echo '<li>' . $subkey;
}
echo "<BR>---";
}
?>
The echo lines displays this output...
Array
a1
a2
a3
---
Array
b1
b2
---
Array
c1
c2
c3
---
Array
d1
d2
d3
---
Array
e1
---
Each line displays 'Array' but I want to display the actual value(a, b, c, d, e) there...
What's the right syntax to reference the field in the array???
Thank you...