Modify many rows in a mysql database at the same time
database, mysql, php, str-replace
Solution
try this
$new_array = str_replace(array("£",","),array("",""),$old_array);
Problem
I have a database with prices from lots of different products. They're all in this format: £25,000. What I want is the following: 25000. I figured I must use a foreach loop and use str_replace, but I can't seem to find a way to delete the pound sign and the comma. I also have a few rows where the prices are missing, they're in the database as following: £00 Again, I want to delete the pound sign. So that must be a different loop I guess? Could you explain how it must be done?