PHP 5.6.31 Released

Voting

Please answer this simple SPAM challenge: nine minus four?
(Example: nine)

The Note You're Voting On

Anonymous
6 years ago
Here is function that rounds to a specified increment, but always up. I had to use it for price adjustment that always went up to $5 increments.

<?php 
function roundUpTo($number, $increments) {
   
$increments = 1 / $increments;
    return (
ceil($number * $increments) / $increments);
}
?>

<< Back to user notes page

To Top