note 66755 added to function.ceil
| From: | bdewoody at yahoo dot com | Date: | Sun, 28 May 2006 05:38:18 +0000 |
| Subject: | note 66755 added to function.ceil | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-112424@lists.php.net to get a copy of this message | ||
To round $value up to the nearest tens, hundreds, thousands and so on:
$tens = round($value+5,-1);
$hundreds = round($value+50,-2);
$thousands = round($value+500,-3);
For rounding down, simply subtract the 5, 50 and 500 from the value.
----
Server IP: 64.71.164.2
Probable Submitter: 65.189.187.4
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.ceil.php
Edit -- http://master.php.net/note/edit/66755
Del: integrated -- http://master.php.net/note/delete/66755/integrated
Del: useless -- http://master.php.net/note/delete/66755/useless
Del: bad code -- http://master.php.net/note/delete/66755/bad+code
Del: spam -- http://master.php.net/note/delete/66755/spam
Del: non-english -- http://master.php.net/note/delete/66755/non-english
Del: in docs -- http://master.php.net/note/delete/66755/in+docs
Del: other reasons-- http://master.php.net/note/delete/66755
Reject -- http://master.php.net/note/reject/66755
Search -- http://master.php.net/manage/user-notes.php