php filter map code example
Example: map filter php
<?php
$arr = array(
"one" => array(1, 2),
"two" => array(1, 2),
"three" => array(1, 2)
);
$res = array();
array_walk($arr, function ($v, $k) use (&$res) {
$res[$k] = $v[0];
});
print_r($res);