Any reason why printf() does not support formats with thousands separator?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$SUBJ says it all - I've recently discovered that a format such
as %'.2f" results in this:

php -r "printf(\"%'.2f\", 23232323.237);"
23232323.237000

I know that number_format() will do the same, but I am given the format
spec as an interface, I would need to try to parse it and then decide
whether to use printf() or number_format(). 


-- 
Per Jessen, Zürich (19.9°C)
http://www.hostsuisse.com/ - virtual servers, made in Switzerland.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux