/ Published in: PHP
Simple tag links from a database with tags stored in a field as 'tag,tag,tag,tag'.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php //MySQL query for tags. $tag_limit = 20; $mysql_tags = "SELECT tags FROM entries LIMIT $tag_limit"; foreach ($row_tag_array as $newtag) { if ($tags[$newtag] < 200) { $tags[$newtag] = $tags[$newtag] + 20; } } else { $tags[$newtag] = 100; } } } foreach ($tags as $tag => $size) { echo "<a style=\"font-size: $size%;\" href=\"?t=$tag\">$tag</a> "; } ?>
URL: http://underscoreundefined.co.cc/