squiblo Posted June 23, 2010 Share Posted June 23, 2010 Some of my data in sql have inverted commas in them, and when I try to echo them out, they kind of mess up, this is what I have tried but I am obviously doing something wrong. Thanks htmlspecialchars(stripslashes(mysql_real_escape_string($row['surname']))); Quote Link to comment https://forums.phpfreaks.com/topic/205602-getting-data-with-inverted-commas-from-sql/ Share on other sites More sharing options...
squiblo Posted June 23, 2010 Author Share Posted June 23, 2010 For example if $row['surname'] = "I'ts Tuesday" it would mess up because of the inverted comma in "I'ts" Quote Link to comment https://forums.phpfreaks.com/topic/205602-getting-data-with-inverted-commas-from-sql/#findComment-1075890 Share on other sites More sharing options...
squiblo Posted June 23, 2010 Author Share Posted June 23, 2010 Turned out the problem was else where Quote Link to comment https://forums.phpfreaks.com/topic/205602-getting-data-with-inverted-commas-from-sql/#findComment-1075896 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.