• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to insert comas into a number?

(I need this for an old project that is not based on CI)

I have no clue how to do this.

The system: The user can type in a number, after numerous formulas and functions it changes and gets displayed on a different page, where it shows up like

10000 or 200 or 6020400 or any number for that matter, I would need numbers that are over 3 digits long to be parsed, so instead of 1000 it would show 1,000 or 1,000 and instead of for example 9284155213 it would show 9,284,155,213.

I hope you get the idea... Does anyone know any easy way to do this? (I don't really mind if it's php or javascript...)

Thanks Smile

you can use the php number_format function to do what you want.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.