Jump to content

round up?


AV1611

Recommended Posts

Change it to:

 

<?php
function ceil_nearest($number, $power) {
    if ($power < 1) {
        return false;
    }
    elseif (pow(10, $power) > $number) {
        return pow(10, $power);
    }
    return ceil($number * pow(10, ($power * -1))) * pow(10, $power);
}

Link to comment
https://forums.phpfreaks.com/topic/122808-round-up/#findComment-634175
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.