Location: PHPKode > projects > Andy's PHP Knowledgebase > inc/tags.php
<?php
include_once "./classes/mysql.class.php";
$tagfirst=TRUE;
 $mysqldb = new mysql();
 $mysqldb->connect();
 $mysqldb->select(); 

$mysqldb->query("SELECT DISTINCT id, tag FROM tags GROUP BY tag ORDER BY COUNT(*) DESC LIMIT 10");

while ( $row = $mysqldb->fetchObject()){

if($tagfirst==TRUE  && $row) {
echo "<p><b>Article Tags:</b></p>";
}
echo '<a href="keysearch.php?keyword_list=' . $row->tag . '">' . $row->tag . '</a> ';
$tagfirst=FALSE;
}
echo '<br /><br />'; 
?>
Return current item: Andy's PHP Knowledgebase