Spacing issue in a html string
<p>On my website I have a section with announcements and now I'm working at a tool which will allow moderators to edit or post new announcements.
When a moderator posts an announcement he has a form with an input for the title and a textbox for the content of the article. I use nl2br() function (to insert HTML line breaks before all newlines) in the variable which contains the content of the article.
So when I insert an article in the database it will look like this:</p>

<pre><code>First row ...&lt;br /&gt;Second row.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Moderators team
</code></pre>

<p>When a moderator wants to edit an article I have a textbox which containes the article:</p>

<pre><code>&lt;textarea name="body" maxlength="1000" cols="105" rows="10"&gt;&lt;?php echo str_replace('&lt;br /&gt;', "\n", $content); ?&gt;&lt;/textarea&gt;
</code></pre>

<p>If the moderator click save button (whithout making any modification) the article becomes something like this (the number of <br /> tags doubles):</p>

<pre><code>First row ...&lt;br /&gt;&lt;br /&gt;Second row.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Moderators team
</code></pre>

<p>Can anybody help me to fix this. </p>
