note 24522 added to function.round
| From: | kt at netspirit dot ch | Date: | Tue, 20 Aug 2002 13:10:50 +0000 |
| Subject: | note 24522 added to function.round | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-35250@lists.php.net to get a copy of this message | ||
because of some site-effects between round() and modulo, therfore the result is not exactly at
every time ...
another way ( and without site-effects) of getting 0.05 increments for currencies, f.e. swiss
francs:
$res = (round(20*$chf))720;
echo $res;
with kind regards
--
http://www.php.net/manual/en/function.round.php
http://master.php.net/manage/user-notes.php?action=edit+24522
http://master.php.net/manage/user-notes.php?action=delete+24522
http://master.php.net/manage/user-notes.php?action=reject+24522