Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Never liked printf, why is it doing this?
April 28, 2005, 5:27 pm
rate this thread
Why does this:
echo "<br>Total Value of Orders: ".printf('$%01.2f',
Result in this?
Total Value of Orders: 9
I have no idea where the '9' came from and why does @sum_value print
before the string?
Re: Never liked printf, why is it doing this?
*** Chris Hope wrote/escribió (Fri, 29 Apr 2005 07:41:37 +1200):
O maybe: http://www.php.net/number_format
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group