We can get highest and lowest value from an array by using max() and min() functions.
https://www.plus2net.com/php_tutorial/array_max.php
We can also get the respective keys of Maximum and Minimum values by using array_search() function.
Function max() and min() returns the value only.
$ar=array(25,26,47,14,29,58,15);
echo max($ar); // output is 58
We can get the Key or index of the maximum value element by using array_search(), input to the array_search() function is the maximum or minimum value.
$key=array_search(max($ar),$ar);
echo $key;
#phparraymax #phparraymin #highestvalue