note 85465 deleted from function.round by felipe

From: Date: Sun, 07 Sep 2008 14:45:35 +0000
Subject: note 85465 deleted from function.round by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-144219@lists.php.net to get a copy of this message
Note Submitter: Chris ---- I dont think it is a bug as such but when rounding genrally you tend to only round from the digit after the precision you want. The only way to get arround this is by rounding it twice with diffrent precisions: <?php $round1 = round(8.1246, 3); //8.125 $round2 = round($round1, 2); //8.13 echo $round2; ?>

« previous php.notes (#144219) next »