note 32744 added to function.number-format

From: Date: Thu, 05 Jun 2003 19:01:43 +0000
Subject: note 32744 added to function.number-format
Groups: php.notes 
Request: Send a blank email to php-notes+get-49808@lists.php.net to get a copy of this message
It seems that numberformat of a calculated value can often return -0.00 if it should be zero, but there are additional decimal places. I'd say it should do a round, but so be it. Just something to watch out for when dealing with numbers. Instead, do a number_format (round ($number, 2, 2); ---- Manual Page -- http://www.php.net/manual/en/function.number-format.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32744 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32744&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32744&report=yes

« previous php.notes (#49808) next »