rendered paste body $query = "SELECT DISTINCT tags FROM files";
$result = mysql_query($query);
if (mysql_num_rows($result) > 5)
{
while ($row = mysql_fetch_array($result))
{
$tags = explode(', ', $row['tags']);
foreach($tags as $a=>$b)
{
echo "<font size=\"5\"><a href = 'tag.php?tag=$b'>$b</a></font> ";
}
}
}
elseif (mysql_num_rows($result) < 5)
{
while ($row = mysql_fetch_array($result))
{
$tags = explode(', ', $row['tags']);
foreach($tags as $a=>$b)
{
echo "<a href = 'tag.php?tag=$b'>$b</a> ";
}
}
}
?>