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 $_session in php?
What is form action php?
Can we use session in mvc?
What is the difference between characters 34 and x34?
What does csrf token mean?
What are the characteristics of php variables?
What is overriding in php?
Can I use php in html?
What is constructor and destructor?
How can you increase the maximum execution time of a script in php?
What are escaping characters?
How does php work with apache?
How to check if a string contains a character or word in php?
Why print_r is used in php?
What are the string functions in php?