I have a complex array, with structure like the following..
array(3) {
["status"]=>
int(1)
["data"]=>
array(113) {
[0]=>
array(3) {
["id"]=>
string(6) "838424"
["language"]=>
NULL
["work_start_date"]=>
string(19) "2003-04-28 00:00:00"
}
[1]=>
array(3) {
["id"]=>
string(6) "839062"
["language"]=>
NULL
["work_start_date"]=>
string(19) "2014-01-15 12:53:00"
}
}
}
I can get the "id" of a certain element by using something like the following..
print $my_array["data"]["0"]["id"] . "\n";
But what I want to do is loop through the 0,1 etc elements, and I don't know how to do that. I thought something like the following would do it, but it doesn't work.
foreach ($my_array["data"] as $key) {
print $my_array["data"][$key]["id"] . "\n";
}
Any insight would be appreciated