How can I avoid <br> tags inside of other tags using php : <p>For some reasons, I do not want to have <code>&lt;br&gt;</code> tags inside of my others tags. For example, if I have </p>

<pre><code>&lt;b&gt;This is a line&lt;br&gt;another line?&lt;/b&gt;
&lt;i&gt;testing 1&lt;br&gt;testing 2&lt;/i&gt;
</code></pre>

<p>I want it to be converted to</p>

<pre><code>&lt;b&gt;This is a line&lt;/b&gt;&lt;br&gt;&lt;b&gt;another line?&lt;/b&gt;
&lt;i&gt;testing 1&lt;/i&gt;&lt;br&gt;&lt;i&gt;testing 2&lt;/i&gt;
</code></pre>

<p>I know that they display the same in browsers. But I need to have the codes in this format for some other reasons. I am using php. Thanks for your help. </p>
