I want to find tags from the last 50 posts and print them with the number of how many the tag was repeated?
so far I printed the tags. how can I print the number of "how many the tag was repeated".
$posts = mysql_query("SELECT * FROM posts ORDER BY id desc Limit 50");
while($fetch_tags = mysql_fetch_assoc($posts))
{
$tags_array = str_word_count($fetch_tags['tags'],1);
}
foreach($tags_array as $tag)
{
echo $tag .'<br/>'; // ex: html</br/>php</br/> ...etc.
}
i want the output be like $tag:$number<br/>
...