program logic for second largest number in an array in php

Solutions on MaxInterview for program logic for second largest number in an array in php by the best coders in the world

showing results for - "program logic for second largest number in an array in php"
Rodrigo
28 May 2016
1function secondHighest(array $arr) {
2    
3    sort($arr);
4    
5    echo $arr[sizeof($arr)-2];
6}
7 
8 
9secondHighest(array( 4, 9, 5, 2, 8, 0, 3, 22));
10
queries leading to this page
find second highest number from array in phphow to find second highest number in array in phphow to find second largest number in array in phphow to find second largest number in array phpphp return largest numberfind the second largest number in an array phphow do you find the second maximum number from an array phpfind largest number in array php using loophow to get largest number in array php without in functionhow to find largest number from array in php print second largest number in array phpfind largest number in array php without functionphp array get largest valuefind 2nd largest value in an array phpsecond greatest element in array in phparray second occurence php5 highest number in an array phpprogram logic for second largest number in an array in phpfind second largest number in array phpwrite php program to find second highest element in arraylargest number in array in phpfunction to print the second largest element in an array phpsecond highest element in array in phpfind second highest value in array in phpcreate a list of numbers and returns the second largest number phphow to find the largest numbers in an array in phpprogram to find second largest number in an array in phpfind 2nd largest value in an array in phpfind largest number in array php functionget largest number in array phpsecond highest value in array phpenter an array and find the 2 largest number in phpwrite a php script to find the largest number from three given numberssecond largest number phpenter an array and find the 2 largest elements in phpfind second smallest numbers phphow to find second highest value in array in phphow to find largest number in phphow to get largest number in array phpfind second largest number in list phpsecond largest element in array in phpfind the 2 largest elements in the array phpprogram logic for second largest number in an array in php