Jump to content


Photo

adding commas


  • Please log in to reply
1 reply to this topic

#1 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 25 July 2006 - 05:27 PM

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

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 25 July 2006 - 05:28 PM

Use number_format

$number = '123456789';

echo number_format($number, '0', '.', ',');





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users