Jump to content

Archived

This topic is now archived and is closed to further replies.

desithugg

adding commas

Recommended Posts

umm i want to view a number containg the money a person owns in the game but i wanna view it with using the commas after every 3 numbers like instead of showing 32231123 i want it to show 322,311,23

Share this post


Link to post
Share on other sites
Use [url=http://www.php.net/number_format]number_format[/url]

[code=php:0]$number = '123456789';

echo number_format($number, '0', '.', ',');[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.