Round Up To Multiple With PHP
Here is a simple function that will round a number up to a given multiple. Impress your friends!
<?php
function roundUpToMultiple( $number, $multiple)
{
return ceil( $number/$multiple ) * $multiple;
}
?>
Example Usage
<?php
echo roundUpToMultiple( 12, 7 );
?>