max()
max - Find highest value
Syntax
mixed max (
array $values,
mixed $value1,
mixed $value2,
mixed $value3...,
array $values,
mixed $value1,
mixed $value2,
mixed $value3...)
Arguments
- values - An array containing the values.
- value1
- value2
- value3...
- values - An array containing the values.
- value1
- value2
- value3...
Description
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.
Version
PHP 4, 5
Return value
max() returns the numerically highest of the parameter values. If multiple values can be considered of the same size, the one that is listed first will be returned.