PHP function max()

Availability in PHP 4.0

Returns the largest element of the array.

Parameters

Parameter Data type Default value Note
$value1 `array mixed` not
$value2 mixed null,
$values mixed not

Return values

mixed

Returns the largest element of the array.

php
max([1, 5, 3, 6, 2, 4]); // returns 6

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.

PHP function max()