//Code PHP 
// เชื่อต่อ database ก่อน
$terms = array();
$query = mysql_query(“SELECT term, counter FROM search ORDER BY counter DESC LIMIT 30″);
// ทำการใส่ข้อมูลลง Array
while ($row = mysql_fetch_array($query))
{
$term = $row['term'];
$counter = $row['counter'];
$terms[] = array($term => $counter);
}
// หาค่า Max เพื่อที่จะคำนวณหา ช่วงของข้อมูล
$maximum = max($terms);
$maximum = max($maximum);
shuffle($terms);
 ===================================================================
//CSS
CSS:
#tagcloud {
width: 300px;
background:#FFFFCC;
color:#0066FF;
padding: 10px;
border: 1px solid #FFE7B6;
text-align:center;
}#tagcloud a:link, #tagcloud a:visited {
text-decoration:none;
}
#tagcloud a:hover, #tagcloud a:active {
text-decoration: underline;
color: [...]

If you enjoy our post, feel free to subscribes to our rss feeds