PHP floor() Function Example

PHP floor() Function Example


Posted in : PHP Posted on : January 28, 2011 at 5:28 PM Comments : [ 0 ]

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 

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics