Lets say I have the following array:
$v = Array
(
[0] => Array
(
[a] => 1
[b] => 2
)
[1] => Array
(
[a] => 11
[b] => 22
)
)
Is there a native function taking the array and a key as input, and returning an array of all the values for the given key? With the above example it would give:
php> find_values_by_key($v, 'b');
Array( [0] => 2, [1] => 22 )
(I know I could write my own function, I'm just wondering if a native one exists).