Hello all.
I am curious to know if there is a built in function to replicate the output of this code:
function arrayExtractAssoc(array $array, $el){
$return = array();
foreach($array as $key => $arr)
$return[$key] = $arr[$el];
return $return;
}
$array = array(0 => array('foo' => 2,
'bar' => 3
),
1 => array('foo' => 3,
'bat' => 'bar'
)
);
print_r( arrayExtractAssoc($array, 'foo'));
TIA!