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
What is the use of php and mysql?
How to fix "headers already sent" error in php
How can cross site request forgery csrf be prevented?
Explain the three different kinds of Arrays?
Does wordpress still use php?
What are the differences between GET and POST methods?
Tell me how comfortable are you with writing html entirely by hand?
hello all, I need some sample placement papers in lion bridge.. can anyone help me?
Explain about PHP filter and why it should be used?
Why does php start with variables?
What is the delimiter default in PHP?
Which function you can use in php to open a file for reading or writing or for both?
What is array filter in php?
How to use http headers inside php?
What does $this do in php?