I store HTML and text data in my database table in its raw form - however, I have a slight problem in getting it to output correctly. Here are some examples of data stored in the AS IS table:
<p>Professional Freelance PHP & MySQL developer based in Manchester. <br />Providing an unbeatable service at a competitive price.</p>
To display this data, follow these steps:
echo $row['details'];
And this correctly outputs the data, however, when I check the W3C validator, it says:
character "&" is the first character of a delimiter but occurred as data
So I tried using htmlemtities and htmlspecialchars , but it just causes the HMTL tags to be displayed on the page.
What is the right way to do this?
Gstar source share