manix Posted July 10, 2011 Share Posted July 10, 2011 Hey, I first thought that was an HTML issue so I posted in the HTML section but now when I actually think about it, it's a PHP one and I tried to move the thread but didn't find a way how so if a moderator could just delete the other thread So what's really bothering me is that for example I have a certain number of comments of something (say a photo) in my database and when I retrieve them I am echo-ing them in a table, but if a comment contains some html tags they are being ran by the browser. How can I have them displayed as they are in the string ? Quote Link to comment https://forums.phpfreaks.com/topic/241601-html-tags-problem/ Share on other sites More sharing options...
.josh Posted July 10, 2011 Share Posted July 10, 2011 Run the content through htmlspecialchars or htmlentities Quote Link to comment https://forums.phpfreaks.com/topic/241601-html-tags-problem/#findComment-1240954 Share on other sites More sharing options...
manix Posted July 10, 2011 Author Share Posted July 10, 2011 sheesh ... thank you ! Quote Link to comment https://forums.phpfreaks.com/topic/241601-html-tags-problem/#findComment-1240955 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.