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.