$count=0;
$sql="SELECT tags FROM entry WHERE tag LIKE '%$tag%'";
$result = mysql_query($sql);
while($data=mysql_fetch_array($result)){
if(mysql_num_rows($result)!=0){
$tags1=explode(',',$data['tags']);
for($loop=0; $loop<=count($tags1)-1; $loop++){
if(!in_array($tags1[$loop], $tags2)){