Is there a simple way to extract the money amount from a string using php?
For example, I have $1,419.99
I want to get in return 1419.99
Another example, I have $1,321
I want to get 1321 back.
I know I can manually remove $ and , but is there a way using something like preg_match to grab all the numbers and if any thing after the decimal, grab that as well and just return the number with no , or dollar sign? Seems like a simple solution but for some reason my mind is not wrapping around this.