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']))); 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" 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 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
Archived
This topic is now archived and is closed to further replies.