Ok, I searched google and these boards for an answer to no avail, so I'm taking a stab at this. I hope it's not something painfully obvious in the end.
Basically, I have medium sized data with html tags in it. I want to read the data into a php variable with the html tags in tact to then display it correctly in the browser. I can get my data and print/echo it, but it converts the html tags into ascii characters rather than the appropriate html rendering.
I've done this before with xml by putting <![CDATA[ ]] around the data node, and it works beautifully. However, this doesn't work with mysql. I've tried different text, varchar, blob data types to the same effect. It seems that the browser would see the tags and just read them as html, but I guess I'm missing something.
I really prefer to keep the html tags for certain purposes. Can anyone help me??
Rendering HTML from a MYSQL table
Moderator: General Moderators
-
bentobenji
- Forum Newbie
- Posts: 1
- Joined: Tue Apr 28, 2009 6:40 am
Re: Rendering HTML from a MYSQL table
probably this is what you are looking for
http://in2.php.net/htmlentities
http://in2.php.net/htmlentities