Number formatting

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

Post Reply
tommy1987
Forum Commoner
Posts: 92
Joined: Tue Feb 21, 2006 8:35 pm

Number formatting

Post by tommy1987 »

What is the best way to present a number putting the commas into it e.g.

Currently: 12044536645
I want: 12,044,536,645

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Number formatting

Post by Chris Corbyn »

tommy1987 wrote:What is the best way to present a number putting the commas into it e.g.

Currently: 12044536645
I want: 12,044,536,645

Thanks
You practically answered your own question in the thread title.

php.net is your friend :)

http://www.php.net/number_format
Post Reply