PHP Math Function : max()

The max() returns the highest value in an array, or the highest value of several specified values. The syntax is:
 max(array);
or
 max(value1, value2, value3 ....);
Where array is name of array, and value1, 2... means numerical values.

Example :
<?php

  $arr = array(10, 50, 30, 100, 90, 99);
  echo max($arr) . "<br/>";
  echo max(30, 90, 78, 56, 5, 75) . "<br/>";

?>
Output :

100
90


Next Topic :