|
|
PHP min() - Math Functions
|
Tutorials » Php »
|
Topic |
What is min Function?
|
|
Explanation |
|
The "min()" function returns the lowest value among the two numbers given.
Syntax:
min(x,y)
In the above syntax "x","y" are the numbers to be compared to find the lowest value.
Example:
<?php
echo(max(4,8) . "<br />");
echo(max(-4,7) . "<br />");
echo(max(-2,-6) . "<br />");
echo(max(8.30,8.40))
?>
Result:
4
-4
-6
8.3
In the above example the lowest values among the numbers are displayed.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|