$content = '<h3>popular tags »</h3><hr>';
$result = $db->sql_query("SELECT tags FROM ".DOWNLOAD_TABLE." ");
while($row = $db->sql_fetchrow($result)){
$dl_tags_id = $row['tags'];
$dl_tags_id_ex = explode(" ",$dl_tags_id) ;
$dl_tags_id = array_unique($dl_tags_id_ex);
$c = count($dl_tags_id);
for($i=1;$i<$c-1;$i++){
//for loop content
}
}
echo $content;
Hey guys. I used the above code to show my popular tags. As you can see in the code, I have two tables, one is download table that stores tags ID in array format such as:
20 21 13 14
And the other one is tags table that define those IDs
Now the only problem is that when printing this code, I can see duplicated tags as:
white(2)
blue(4)
white(2)
I wonder how prevent showing duplicated output.
Thanks in advance