round up to nearest php code example
Example 1: php round up
//round up to nearest integer
echo(ceil(0.60) . "<br>");
//result 1
Example 2: php round nearest half
$x = floor($x * 2) / 2;
//round up to nearest integer
echo(ceil(0.60) . "<br>");
//result 1
$x = floor($x * 2) / 2;