Returns the maximum value.
max() returns the element with the highest numerical value in an array. Non-numerical strings count as 0. The parameters passed to the function can be either an array or at least two scalars.
<?php
print max(array("1500", 34.3, 4)) . " ";
print max("hello world", 33, 2.3);
?>
1500 33
This example demonstrates the use of array and scalar parameters, and the evaluation of strings.