ceil(number);ceil函数向上舍入为最接近的整数,我用于分页.
<!DOCTYPE html>
<html>
<body>
<?php
echo(ceil(0.60) . “<br>”); //1
echo(ceil(0.40) . “<br>”); //1
echo(ceil(5) . “<br>”); //5
echo(ceil(5.1) . “<br>”); //6
echo(ceil(-5.1) . “<br>”); //-5
echo(ceil(-5.9)); //-5
?>
</body>
</html>