note 17734 rejected from function.floor by zak
| From: | zak@php.net | Date: | Fri, 21 Dec 2001 11:48:15 +0000 |
| Subject: | note 17734 rejected from function.floor by zak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23746@lists.php.net to get a copy of this message | ||
How about a second parameter to the function called Decimals?
Say I need a percentage of something and I'd like to have the output using two decimals.
Usually you'd first multiply the percentage value with 100, then divide it by 100 after the
floor()/round()/ceil() .. this would make our code a few lines shorter, also more comprehensive,
than doing this lame work-around for the decimals.