note 82748 deleted from function.round by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 16:13:49 +0000 |
| Subject: | note 82748 deleted from function.round by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-154770@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
If you want 5799.99 to round to 5800.00, then:
$discount = '5799.995';
$discount = round($discount, -2);
See e.g.: echo round(1241757, -3); // 1242000