I saved some data in the database using mysql_real_escape_string() so the single quotes are escaped like this '. It looks ok in the browser, but how can I convert it back to single quote when I save the text in a txt file?
I saved some data in the database using mysql_real_escape_string() so the single quotes are
Share
Please note that
mysql_real_escape_string()does not turn apostrophes'into'Only HTML-oriented functions do, so you must have calls tohtmlentities()somewhere in your script.As for your question, the function you’re looking for is html_entity_decode()