round up php number 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: php round up
//round up to nearest integer
echo(ceil(0.60) . "<br>");
//result 1
// round down
echo floor(1.5); // prints 1
// round up
echo ceil(1.5); // prints 2
//round up to nearest integer
echo(ceil(0.60) . "<br>");
//result 1