float round ( float num [, int precision] ) rounds parameter to the nearest integer to its current value : round « Math « PHP






float round ( float num [, int precision] ) rounds parameter to the nearest integer to its current value

 
<?
    $number = round(11.1); // 11
    $number = round(11.9); // 12
    $number = round(11.5); // 12
    $number = round(11); // 11
?>
  
  








Related examples in the same category

1.round a double
2.Provide the number of decimal places to round to: