How to use ceil in PHP
This article describe about ceil() Function in PHP.
ceil() Function
The value of a number rounded UPWARDS to the nearest integer use ceil() function.
Syntax
Parameter |
Description |
x |
Required a number |
Example
<html>
<body>
<?php
echo(ceil(1.70) . "<br />");
echo(ceil(0.70) . "<br />");
echo(ceil(5) . "<br />");
echo(ceil(7.1) . "<br />");
echo(ceil(-7.1) . "<br />");
echo(ceil(-7.9))
?>
</body>
</html> |
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here