note 28598 added to function.round

From: Date: Fri, 17 Jan 2003 17:16:44 +0000
Subject: note 28598 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-42287@lists.php.net to get a copy of this message
/*next line will output 1.4999 as 1.49, no round. Use it if you want to collect fractional money less than 0.01 after for example % calculations.*/ $a=1.4999; $a = sprintf("%01.2lf", floor($a*100)/100); //$a=1.49 -- http://www.php.net/manual/en/function.round.php http://master.php.net/manage/user-notes.php?action=edit+28598 http://master.php.net/manage/user-notes.php?action=delete+28598 http://master.php.net/manage/user-notes.php?action=reject+28598

« previous php.notes (#42287) next »