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
Tell me what the difference between the 'bitwise and' operator and the 'logical and' operator?
iam mca post graduate in 2010 not getting job in JAVA so iam looking for carear in php as market demand is high so it is best option to try for php or not
What is use of isset function in php?
What is the difference between substr() and strstr()?
What are the method available in form submitting?
How many types of arrays are there in php?
What is polymorphism in oop php?
Should I use mysqli or pdo?
Is false empty php?
Explain php split() function.
What beforeFilter() is used?
How can we display information of a variable and readable by human with php?
What is a comment in php?
How is it possible to know the number of rows returned in the result set?
What are session variables in php?