Useful PHP functions

Some useful stuff I’ve come across; implemented in PHP etc.
Round to the next highest number ending with 0

    function round_up($int) {
        return 10 * ceil(0.1*$int);    
    }

echo round_up(24); //30
echo round_up(21); //30

to be continued…

RSS feed for comments on this post. TrackBack URI

Leave a Reply