Answers for "map filter php"

PHP
0

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);
Posted by: Guest on January-09-2021

Browse Popular Code Answers by Language