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