Last active
January 30, 2021 14:48
-
-
Save ravishakya/aec83c56b54ae96da8bdfb2b28c4073a to your computer and use it in GitHub Desktop.
Revisions
-
ravishakya revised this gist
Jun 5, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ function multidimentional_array_map( $function, $arr ){ $result = array(); foreach ($arr as $key => $val){ $result[$key] = (is_array($val) ? multidimentional_array_map($function, $val) : $function($val)); } return $result; } -
ravishakya revised this gist
Jun 5, 2017 . No changes.There are no files selected for viewing
-
ravishakya created this gist
Jun 5, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ function multidimentional_array_map( $funcion, $arr ){ $result = array(); foreach ($arr as $key => $val){ $result[$key] = (is_array($val) ? my_array_map($function, $val) : $function($val)); } return $result; }