Ne.OnZ Posted July 8, 2008 Share Posted July 8, 2008 Is there any way to retrieve text from mysql but exclude any html posted in there? Example: If an entry had "<br />< i >Hello</ i>". I would want to retrieve just the the word "Hello". But since there is a <br /> there. Can it just hide the line break code but still be visible when you echo it? Thank You. Link to comment https://forums.phpfreaks.com/topic/113676-solved-retrieve-from-database-with-no-html/ Share on other sites More sharing options...
DarkWater Posted July 8, 2008 Share Posted July 8, 2008 I think you want htmlspecialchars(). Link to comment https://forums.phpfreaks.com/topic/113676-solved-retrieve-from-database-with-no-html/#findComment-584183 Share on other sites More sharing options...
ratcateme Posted July 8, 2008 Share Posted July 8, 2008 strip_tags might be more usefull it removes all html tags Scott. Link to comment https://forums.phpfreaks.com/topic/113676-solved-retrieve-from-database-with-no-html/#findComment-584185 Share on other sites More sharing options...
DarkWater Posted July 8, 2008 Share Posted July 8, 2008 "Can it just hide the line break code but still be visible when you echo it?" >_> Link to comment https://forums.phpfreaks.com/topic/113676-solved-retrieve-from-database-with-no-html/#findComment-584188 Share on other sites More sharing options...
Ne.OnZ Posted July 8, 2008 Author Share Posted July 8, 2008 "Can it just hide the line break code but still be visible when you echo it?" >_> Don't give me that face D:!! Link to comment https://forums.phpfreaks.com/topic/113676-solved-retrieve-from-database-with-no-html/#findComment-584189 Share on other sites More sharing options...
Ne.OnZ Posted July 8, 2008 Author Share Posted July 8, 2008 Thank You! strip_tags() worked! :) :) Link to comment https://forums.phpfreaks.com/topic/113676-solved-retrieve-from-database-with-no-html/#findComment-584194 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.