Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 200004

[PHP4BETA] number_format problem (?) From: Alexander Fordyce (alex <email protected>)
Date: 04/20/00

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 <email protected>

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
For additional commands, e-mail: php4beta-help <email protected>
To contact the list administrators, e-mail: php4beta-admin <email protected>