I have used htmlentities() to insert HTML in the database. This outputs the HTML as : <p> etc...
Now I need to strip these values so it doesn't show any HTML or any HTML code. I know tat using : html_entity_decode(); restores the HTML to displayable HTML. But i need to get rid of everything to do with HTML. I just need the text in the html to be returned.
No it's not. I am looking for a way to remove all the entities of HTML as such: &lt;p&gt; which would be <p>. Strip tags only removes real html strings such as:
Well how about the part that has to do with this? From where it fetches the data from the database, to the part where it's being displayed?
There might be another way to achieve the same, but would be more complicated since you want to strip the HTML as well. And there must be just a small error somewhere.
As you describe, it "displays the HTML as text", I guess you're not applying the function to the right variable or something along these lines.