$value) { $newArr[$key] = (is_array($value) ? multiDimensionalArrayMap($func,$value) : $func($value)); } } return $newArr; }