I have a form formatted with javascript, which makes numbers look like:
10.000 or 2.300
<form>
<input type="text" name="price_1" value="2.300">
</form>
But i want to store them in mysql without dots. How to remove them?
mysql_query("INSERT INTO prices price_a='price_1' WHERE id ='price_id'");
I see money_format and number_format, but its just format the numbers dont remove anything.
Try this :
str_replace(".", "", $string);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With