round a double : round « Math « PHP






round a double

<?
echo round(2.56); 
echo "<BR>";
      
echo round(1.22);     
echo "<BR>";
echo round(55.22);    

?>
           
       








Related examples in the same category

1.float round ( float num [, int precision] ) rounds parameter to the nearest integer to its current value
2.Provide the number of decimal places to round to: