View Single Post
  #2  
Old 11-09-2011, 01:19 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Remove all characters that aren't numbers, and use int to convert the leftovers to a valid integer.

Store the integer in your database and just reformat it when you display it in your GUIs.

You can use this to format the number 1000 to 1,000 for example:
http://forums.graalonline.com/forums...hp?t=134262839

Just append a $ at the front.

Also it's == not = in your if statement there.
__________________
Quote:

Last edited by fowlplay4; 11-09-2011 at 01:30 AM..
Reply With Quote