I have a database mysql with decimal (10.2) columns,
so I need the price to insert like this 2456.75
Often amounts copied from banks are inserted, and the banks displays like this 2.456,75, and of course a copy and paste is imposible as if I try to insert the amount displayed in bank the amount of 2.45 will be inserted.
To change the coma for a dot I use this:
$cantidad = str_replace(",", ".", $cantidad);
However the dot for the thousands must be taken away before inserting,
I cant do the same for the dot (replace '.' with '') as when we insert manully without copying and pasting we do it correctly writing 2456.75 to insert.
Anyway of deleting the dot but only for thousands?