advanced code snippet search
micmath on 12/20/07
12/20/07 06:39am
in php5 use arraywalkrecursive
function array_map_recursive($callback, $array) { $r = array(); if (is_array($array)) { foreach($array as $key => $value) { $r[$key] = is_scalar($value) ? $callback($value) : array_map_recursive($callback, $value); return $r; } }}
Report this snippet Tweet
Comment:
You need to login to post a comment.