Jump to content

str_replace problem


shadiadiph

Recommended Posts

Ok here is the reason I have made some code to turn the maxminds geocountry lite csv file in to an SQL file the. Reason I need to replace ' and also I need to replace , to an HTML code is because of those annoying country names like 'Korea', republic of' SQL seperates everythig by a ' and a , so i need to replace some ''s with an HTML code

 

Link to comment
https://forums.phpfreaks.com/topic/200608-str_replace-problem/#findComment-1052725
Share on other sites

I know there is a better way of doing it than swaping out the character, but I can't remember how it's done at the moment.  In about 9 ours I'll be back at my development machine, I should have some stock code I can post that does something similar to what you are trying.  I do hope however that someone else has the answer on how to set the sql_escape_character to somthing different.

Link to comment
https://forums.phpfreaks.com/topic/200608-str_replace-problem/#findComment-1052733
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.