Round up a decimal number to the nearest integer
If you want to round up a decimal number to the nearest integer. There is a function ceil( ) could do the job. It is very easy to use, all you have to do is to put the decimal number inside the brackets and it will convert the number. Here are some examples:
<?php echo ceil(8.8); ?>
we get: 9
<?php echo ceil(-12.66); ?>
we get: -12
<?php echo ceil(900.45563); ?>
we get: 901





