- array_map: documentation ( source)
- print_r: documentation ( source)
<?php
function simplify($el)
{
return $el['b'];
}
$a = array(
array(
'a' => 'x',
'b' => 'asdasd',
),
array(
'a' => 'f',
'b' => '123123qwe',
),
);
echo '<pre>'.print_r(array_map(function($e) { return $e['b']; }, $a),true).'</pre>';
?>