PHP Math Function : ceil()

The ceil() function returns a number upto the nearest integer. The syntax is :
 ceil( number );
Example :
<?php

  echo ceil(7.80) . "<br/>";
  echo ceil(-20.90) . "<br/>";
  echo ceil(3.40) . "<br/>";
  echo ceil(56.10) . "<br/>";

?>
Output :

8
-20
4
57


Next Topic :

No comments:

Post a Comment