max

(PHP 3, PHP 4 >= 4.0.0)

max -- Find highest value

Description

mixed max ( mixed arg1, mixed arg2, mixed argn)

max() returns the numerically highest of the parameter values.

If the first parameter is an array, max() returns the highest value in that array. If the first parameter is an integer, string or float, you need at least two parameters and max() returns the biggest of these values. You can compare an unlimited number of values.

If one or more of the values is a float, all the values will be treated as floats, and a float is returned. If none of the values is a float, all of them will be treated as integers, and an integer is returned.