Created
April 29, 2016 06:34
-
-
Save d30jeff/c92ff05fb8d193f793028f401d102dc1 to your computer and use it in GitHub Desktop.
Get highest number in a multidimensional array.
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 characters
<?php | |
$arr = [ | |
0 => [ | |
10000, | |
9000, | |
2000, | |
3000, | |
] | |
]; | |
$highest = array_map(function($num) { | |
return max($num); | |
}, $arr); | |
print_r($highest); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment