recursive array_map for php4
in php5 use array_walk_recursive
Copy this code and paste it in your HTML
function array_map_recursive($callback, $array) {
foreach($array as $key => $value) {
$r[$key] = is_scalar($value) ?
$callback($value) : array_map_recursive
($callback, $value); return $r;
}
}
}
Report this snippet
Comments
Subscribe to comments