Math floor function returns the lower nearest value of number.
PHP floor() Function Example:
Math floor function returns the lower nearest value of number.
Syntax:
floor(parameter)
where parameter is an integer or float value.
Example:
<?php echo(floor(0.99) . "<br />"); echo(floor(0.01) . "<br />"); echo(floor(-8.9)); ?>
Output:
The output of this example is:
0 0 -9
[ 0 ] Comments