Loading…

Write a PHP script to get the largest key in an array?

You can use rsort() to get the highest value in the array.

Example

                                        

$array = array('5','2','8','4');
$result = rsort($array);


//OUTPUT : 8

Suggest An Answer

No suggestions avaliable!

Latest post from PHP Arrays

Ask Question