content);
foreach ($tag_array as $tag) {
$tags[] = $tag[0];
}
}
natcasesort($tags);
$tag_count = array_count_values($tags);
//arsort($tag_count, SORT_STRING);
//ksort($tag_count, SORT_STRING);
//strnatcasecmp($tag_count);
$max_count = max($tag_count);
$min_font_size = 10;
$max_font_size = 30;
$num_intermediate_levels = 1;
$font_size_interval = ($max_font_size - $min_font_size) / ($num_intermediate_levels + 1);
$uri = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
foreach ($tag_count as $tag => $count) {
$font_size = $min_font_size + ($count / $max_count) * $font_size_interval;
$tag = str_replace('#', '', $tag);
echo '#'. $tag .' ';
//echo '#'. $tag .' ('.$count.') ';
}
// Detail/summary with top tags and solo tags
/*
$top_tags = array_filter($tag_count, function($val){return ($val>1);});
$solo_tags = array_diff($tag_count, $top_tags);
krsort($solo_tags, SORT_STRING);
echo " Tags: ";
foreach ($top_tags as $tag => $count) {
$tag = str_replace('#', '', $tag);
echo '#'.$tag.' ';
}
echo "
";
foreach ($solo_tags as $tag => $count) {
$tag = str_replace('#', '', $tag);
echo '#'.$tag.' ';
}
echo " ";
*/
// } else {
// echo "Showing posts with ".$_GET['search']."";
// }