note 9639 added to round

From: Date: Thu, 16 Nov 2000 11:02:25 +0000
Subject: note 9639 added to round
Groups: php.notes 
Request: Send a blank email to php-notes+get-7778@lists.php.net to get a copy of this message
For PHP3 users who can't specify a precision: function my_rounder($value) { $buffer = $value * 100; $rounded = round($buffer); $buffer = $rounded / 100; return $buffer; } Seems to work better than ($value*100)/100 ... http://www.php.net/manual/function.round.php

« previous php.notes (#7778) next »