The min()
function in PHP returns the minimum value
in an array or from a series of values.
The illustration below shows the visual representation of the min()
function.
min(value-1, value-2, value-3...value-n)
or
min(array)
The min()
function requires either an array
or a series of values separated by commas.
This function returns the minimum value
in an array or from a series of values.
<?php#series of valuesecho("min(1,5,3,7,0): ");echo (min(1,5,3,7,0));echo("\n");echo("min(1,-5,3,-7,0): ");echo (min(1,-5,3,-7,0));echo("\n");#arrayecho("min(array(-1,-5,-3,-7,0)): ");echo (min(array(-1,-5,-3,-7,0)));echo("\n");echo("min(array(-1,5,-3,7,0)): ");echo (min(array(-1,5,-3,7,0)));echo("\n");?>