Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function MaxArray($arr){
- $maxValue = 0;
- foreach($arr as $element)
- {
- if(count($element)>1)
- {
- $tempMax = MaxArray($element);
- if($tempMax > $maxValue)
- {
- $maxValue = $tempMax;
- }
- }else{
- if($element > $maxValue)
- {
- $maxValue = $element;
- }
- }
- }
- return $maxValue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement