PHP ceil() Function Example

PHP ceil() Function Example


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

Math ceil function returns the upper nearest value of number.

PHP ceil() Function Example:

Math ceil function returns the upper nearest value of number.

Syntax:

ceil(parameter)

where parameter is an integer or float value.

Example:

<?php
echo(ceil(0.99) . "<br />");
echo(ceil(0.01) . "<br />");
echo(ceil(-8.9));
?> 

Output:

The output of this example is:

1
1
-8 

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


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

 
Tutorial Topics