PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
warrenk
Forum Newbie
Posts: 13 Joined: Wed Nov 01, 2006 8:46 am
Post
by warrenk » Wed Nov 01, 2006 2:26 pm
I am using the following statement to output a number....
printf("%6.2f\n",$total);
Is there anyway to add a ',' for the thousands separator?
Thanks!
Warren
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Wed Nov 01, 2006 2:28 pm
have you looked at
number_format() ?
warrenk
Forum Newbie
Posts: 13 Joined: Wed Nov 01, 2006 8:46 am
Post
by warrenk » Wed Nov 01, 2006 2:51 pm
Didn't know that the number_format() existed.
Tried it and it works....thanks for your help!