I have an array called $array which contains entries like this:
Array (
[2340] => Array (
[cv] => Array (
[size] => 317613
[c] => 3 ) )
[16410] => Array (
[cv] => Array (
[size] => 119808
[c] => 1 ) )
)
I am using the below and everything works except the first value – I need it to display 2340 in the first iteration and then 16410 in the second where I have $row[0] below:
foreach ($array as $row) {
print $row[0];
print($row[cv][size]);
print($row[cv][c]);
}
How do I access that first ID?
Use this…
… instead (as ‘first value’ you’re talking about is actually an index of the element processed).