Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Numerical String Splitting



6:28 am on Jan 14, 2010 (gmt 0)

5+ Year Member

Hi all,

I'm having a little trouble with a few strings. Some of the values are numbers like 78452, 2344, etc.

The trouble is with these numbers it can be hard for some people to read. For example, 4521452662. So I'd like to split the strings into 1000's. For example:

78452 = 78,452
2344 = 2,344
4521452662 = 4,521,452,662

Can anyone show me how to do this?

Thanks in advance.


7:14 am on Jan 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Take a look at number_format [gr.php.net]


7:58 am on Jan 14, 2010 (gmt 0)

5+ Year Member

Works like a charm,

Thank you very much indeed :)


Featured Threads

Hot Threads This Week

Hot Threads This Month