number_format problem (?)

From: Date: Thu, 20 Apr 2000 23:57:49 +0000
Subject: number_format problem (?)
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-13844@lists.php.net to get a copy of this message
Hi all. Not specifically php4 - to my knowledge this is the same in php3 - but while you're at it, here's one for the suggestion box... number_format has one problem (at least I find it a problem)... the third and fourth parameters, (decimal point and thousands separator) don't recognize an empty string: $n = 1234.123 echo number_format ($n, 2, '.', ''); ...outputs "1,234.12" It would be much more useful if it were possible to distinguish between an argument not passed at all and an argument passed an empty string. Thanks, Alex - - - - - - - - - - Alexander Fordyce alex@ax-im.com

« previous php.version4 (#13844) next »