Is there a built in function to do the following?
$a[] = $b[0]['foo'];
$a[] = $b[1]['foo'];
$a[] = $b[2]['foo'];
etc..
I realize I can do something like the following:
foreach($b as $c)
{
$a[] = $c['foo'];
}
But I am really just curious if there is some built in array function that will do this. Thanks.
In short: no.
In long: Maybe 😉 Its because its not “directly built-in”
With PHP5.3
or before
At least for the second solution I would prefer the
foreach-loop 😉