PDA

View Full Version : PHP help ;)



L?KE
02-04-2008, 10:02 PM
Probably should have gone in another forum but -

How in php do you format a number so that there's a comma after every 3 numbers.

eg:
50000 => 50,000

I'm probably missing something really easy?

Hypertext
02-04-2008, 10:05 PM
You could try and do a string replace for 000 to 000,

I don't know a function for it..

Dentafrice
02-04-2008, 10:17 PM
http://us2.php.net/number_format

Hypertext
02-04-2008, 10:24 PM
Ooh nice. Useful for 20000 => $200.00

L?KE
03-04-2008, 11:22 AM
Thanks guys.
+rep all.

Already repped you before reconix ;D

Hypertext
03-04-2008, 10:07 PM
Hehe kk :)

Want to hide these adverts? Register an account for free!