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.
<html>,tag2,tag3,tag4 //an empty value is entered
,tag2,tag3,tag4 //this will also enter an empty value
The html tag will be stripped but an empty value is submitted into the database how can I stop this from happening?
I think it has something to do with this part of my code.
$tags = explode(",", $_POST['tag']);