Kinda new to php and have hit a road block to project completion. please help.
I store html in mysql db as a string, later retrieve html and dump it to screen using htmlentities. Of course it displays as... well, a string. I am trying to format as readable code for users to copy and paste and use for their own use.
example: db returns
Code: Select all
<html><body><h1>whatever</h1><table><tr><td><p>whatever</p></td></tr></table></body></html>Code: Select all
<html>
<body>
<h1>whatever</h1>
<table>
<tr>
<td>
<p>whatever</p>
</td>
</tr>
</table>
</body>
</html>
Thanks in advance.