PHP Manual: max
max
Description
mixed max ( array values )mixed max ( mixed value1, mixed value2 [, mixed value3...] )
If the first and only parameter is an array, max() returns the highest value in that array. If at least two parameters are provided, max() returns the biggest of these values.
Note: PHP will evaluate a non-numeric string as 0, but still return the string if it's seen as the numerically highest value. If multiple arguments evaluate to 0, max() will return a numeric 0 if given, else the alphabetical highest string value will be returned.
Examples