round off value php 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 to whole number
$int = 8.998988776636;
round($int) //Will always be 9
$int = 8.344473773737377474;
round($int) //will always be 8