Answer Posted / nilsoft
ceil()
Returns the next highest integer value by rounding up value
if necessary.
<?php
echo ceil(4.3); // 5
echo ceil(9.999); // 10
echo ceil(-3.14); // -3
?>
floor()
Returns the next lowest integer value by rounding down value
if necessary.
<?php
echo floor(4.3); // 4
echo floor(9.999); // 9
echo floor(-3.14); // -4
?>
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
How can you compare objects in php?
Is age a variable in research?
Difference between mysql_connect and mysql_pconnect?
What is get method in java?
What is faster?
How to include a file to a PHP page?
How to uploaded files to a table?
What is the difference between php and core php?
Is php required for wordpress?
What are getters and setters and why are they important?
What is form action php?
What is the difference between javascript and php?
How to get the directory name out of a file path name?
For image work which library is used in php?
How to create and destroy cookies in php?