PHP exlude tags from being converted to entities
<p>I am sanitizing a string with <code>htmlentites</code> in PHP, and I want to exlude <code>&lt;br&gt;</code>, <code>&lt;b&gt;</code>, <code>&lt;i&gt;</code> and <code>&lt;a href=''&gt;&lt;/a&gt;</code> tags from being converted to entites.</p>

<p>How can i do this</p>

<p>EDIT:</p>

<pre><code>&lt;?php
 $string = "This is a normal string &lt;b&gt;With&lt;/b&gt; html tags &lt;script&gt;&lt;/script&gt;";
 echo htmlentites($string);
 ?&gt;
</code></pre>

<p>This is what i've attempted. I don't know any more</p>
