php and round up code example
Example 1: php round down
// round down
echo floor(1.5); // prints 1
// round up
echo ceil(1.5); // prints 2
Example 2: round up built in function php
echo ceil(0.5); //Prints 1
// round down
echo floor(1.5); // prints 1
// round up
echo ceil(1.5); // prints 2
echo ceil(0.5); //Prints 1