nl2br puts br between html tags
<p>I have a PHP webmail script that I received today message from gmail like this:</p>

<pre><code>$content='
&lt;p&gt;This is just example for MessageContent&lt;/
p&gt;Test...&lt;span&gt;Test&lt;/span&gt;Test..&lt;span
&gt;Test&lt;/span&gt;';
</code></pre>

<p>How can I print it with <code>nl2br</code>?</p>

<p>If I use <code>echo nl2br($content);</code>, I get this result:</p>

<pre><code>&lt;br /&gt;
&lt;p&gt;This is just example for MessageContent&lt;/&lt;br /&gt;
p&gt;Test...&lt;span&gt;Test&lt;/span&gt;Test..&lt;span&lt;br /&gt;
&gt;Test&lt;/span&gt;
</code></pre>

<p>So how I can fix this problem?</p>
