Hello all.
I run an html tutorial website - all my tutorials are stored in a mysql database. When a tutorial is pulled out, I use the line of code below to put breaks between the paragraphs and between the lines of example code (I use < and > to make the tags show up).
$result[article] = ereg_replace("\r\n", "\n<br>", $result[article]);
However, as you can imagine, if I try to use "real" html - real tags that won't show up in the tutorial but that the browser will parse, each line of code still gets a <br> attached to it. When i make a table, i end up with about a hundred <br>'s all stacked on top of each other. It leaves huge gaps in my tutorials.
What i need to be able to do is prevent this line of code from making <br>'s between my lines of html.
Thanks in advance.