Tutorial :Getting the min and max values from a PHP array



Question:

Is there a built in PHP function that will allow you get the minimum and maximum values from a PHP array?

If not, what's the most efficient way of doing this for the general case?


Solution:1

min and max.

$array = array(1, 2, 3);    $min = min($array);  $max = max($array);  


Solution:2

Max Min


Solution:3

Yes there is. min() and max()


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »