Kemik Posted July 23, 2007 Share Posted July 23, 2007 Hello, I'm making a news system for my website. I've created an admin area where I can edit currently posted news. I have all my news listed in a table with the variables $newsid, $title, $content. $content is saved in the database as html code. Is there anyway of displaying the html code without in executing. E.g. When I pull $content it displays: <b>Today</b> I went to the shops.<br />They were closed. Instead of: Today I went to the shops. They were closed. Thanks. Link to comment https://forums.phpfreaks.com/topic/61387-solved-how-not-to-display-html/ Share on other sites More sharing options...
jscix Posted July 23, 2007 Share Posted July 23, 2007 print the variable containing the html, with this function print (htmlspecialchars($variable)); Link to comment https://forums.phpfreaks.com/topic/61387-solved-how-not-to-display-html/#findComment-305498 Share on other sites More sharing options...
Kemik Posted July 23, 2007 Author Share Posted July 23, 2007 Thanks Link to comment https://forums.phpfreaks.com/topic/61387-solved-how-not-to-display-html/#findComment-305505 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.