If I have:
$data = array(
'id01' => array(
'firstName' => 'Eric',
'lastName' => 'Smith',
),
'id02' => array(
'firstName' => 'John',
'lastName' => 'Turner',
),
);
foreach ( $data as $key){
print "$key[firstName]<br>";
echo $key[0];
}
The $key[0] part is not working...basically i'm trying to output id01, then id02, basically the id part of the array that the forloop is processing...
Any ideas on the correct syntax?
$key[firstName]?