round () in php
Wednesday, November 5, 2008 23:41The PHP function round () is used to round numbers up or down based on their value (Any decimal .5 or above is rounded up, anything under .5 is rounded down.)
by default it will round to the nearest whole number
< ?php echo (round(0.70) . "
"); echo (round(0.50) . ""); echo (round(0.20) . ""); echo (round(-3.40) . ""); ?>
out put
1
1
0
-3

