PHP user entered data problem?
<p>Okay when a user enters tags into the database I strip out HTML elements and separate tags by using a comma , But for some reason when I strip out the html tags an empty value is submitted into the database along with the other tags for example if a user enters the following data.</p>

<pre><code>&lt;html&gt;,tag2,tag3,tag4 //an empty value is entered
,tag2,tag3,tag4 //this will also enter an empty value
</code></pre>

<p>The html tag will be stripped but an empty value is submitted into the database how can I stop this from happening?</p>

<p>I think it has something to do with this part of my code.</p>

<pre><code>$tags = explode(",", $_POST['tag']);
</code></pre>
