I want to import CSV file data into MySql using PHP.I got the code to do this. The data in CSV may contain single quotes and commas within it.I used str_replace to fix the issue.It replaces only one of the characters.But I want to replace both.
example:
Broad Oak Road, Accrington, Lancashire, BB5 2AW United Kingdom.
Road King's College Aberdeen
I have used str_replace("'","\'",$csv_array[0]) to replace single quotes.Is there any way to replace both using a single PHP function? Please help me.Thanks in advance.