I am using MySQL and PHP to populate parts of a site, often with HTML stored in a TEXT field. I like to keep my HTML indented so that the source is neat and easy to read, for example:
<body>
<div>
<p>Blahblah</p>
</div>
</body>
However, when the HTML is pulled from MySQL, I end up with:
<body>
<div>
<p>Blahblahblah</p>
</div>
</body>
This is quite ugly when there is a large amount of HTML being inserted into a DIV that is significantly indented. How can I stop this from happening? FYI, I use wordwrap() to keep each line from being too long.