$tags = array();
$get_tags= mysql_query("SELECT keywords, COUNT(id) AS myCount from mytable where keywords!='' group by keywords") or die(mysql_error());
while ($tag = mysql_fetch_assoc($get_tags))
{
// example of $tag: array('keywords' => 'weddings', 'myCount' => 32);
// so now you would want to get an array to use 'keywords' as key, and 'myCount' as value:
$tags[$tag['keywords']] = $tag['myCount'];
}
PS. it’s better to use [ code ] and [/ code ] or [ php ] and [/ php ] for PHP code, instead of [ quote ] and [/ quote ]