PHP min() function
Complete PHP Math Reference
Definition and Usage
The min() function returns the number with the lowest value of two specified numbers.
Syntax
Parameter |
Description |
x |
Required. A number |
y |
Required. A number |
Example
In this example we will show how to use min() to return the number with the
lowest value
of two specified numbers:
<?php
echo(min(5,7) . "<br />");
echo(min(-3,5) . "<br />");
echo(min(-3,-5) . "<br />");
echo(min(7.25,7.30))
?>
|
The output of the code above will be:
Complete PHP Math Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|