Jump to content

[SOLVED] Add comma to a number using substr()


Moron

Recommended Posts

Okay, let's say that my database result produces the number....

 

423487.00

 

I can easily use substr() to give me "423," a comma, then "487.00" to produce...

 

423,487.00

 

But.... if the thousands position is under 100, like say 23,487.00, then it adds a number from somewhere.

 

How do I directly plug the comma in there, putting it 6 positions from the right, regardless of what is before it?

 

Archived

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

×
×
  • Create New...

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.