How to use ceil() to round fractions up in PHP

1 Answer

0 votes
echo ceil(3.3) . "<br />";   
echo ceil(5.999) . "<br />";  
echo ceil(-3.14) . "<br />";  
echo ceil(3.14) . "<br />";   

 
/*
run: 

4
6
-3
4 

*/

 



answered Jun 4, 2016 by avibootz
...