YouTip LogoYouTip

Func Math Max

# PHP max() Function [![Image 3: PHP Math Reference Manual](#) PHP Math Reference Manual](#) ## Example Find the maximum value using the max() function: <?php echo(max(2,4,6,8,10) . "
"); echo(max(22,14,68,18,15) . "
"); echo(max(array(4,6,8,10)) . "
"); echo(max(array(44,16,81,12))); ?> [Run Example Β»](#) * * * ## Definition and Usage The max() function returns the highest value in an array, or the highest value among several specified values. * * * ## Syntax max(_array_values_); or max(_value1,value2,..._); | Parameter | Description | | --- | --- | | _array_values_ | Required. Specifies an array containing values. | | _value1,value2,..._ | Required. Specifies the values to compare (at least two values). | ## Technical Details | Return Value: | The highest numerical value. | | :--- | | Return Type: | Mixed | | PHP Version: | 4+ | * * PHP Math Reference Manual](#)
← Func Math MinFunc Math Log1P β†’