I have a tag field in my web page, in which user can enter tags seprating them by ,
(comma), same as done in StackOverflow. I am using PHP and I am seprating all tags enetered by the user on the basis of comma using explode function and then adding them to my tags table in teh database.
My code is working perfect for normal tags like if user entered battleship, strategy, sea war
then its working, but lets say user enetered battleship, strategy, sea war,
or battleship, strategy, games, sea war, , , , ,
or battleship, strategy, games,, sea war
or any wrong value, then how will I detect it and then enter only correct value sin the database.
Is it possible using regExp or any other way, please tell me how?