ok, I think I understand the problem. I have a link and some suggested code. First this link:
http://www.mysql.com/doc/C/o/Counting_rows.html
second, based on the info in the manual (see link above), I come up with:
// different sql statement than your previous
$sql="SELECT wld_col_name, COUNT(*) FROM table_name GROUP BY wld_col_name";
$result = mysql_query($sql);
// declare the array
data = array();
// loop through the result and throw the
// values in to an associative array
while($a_row = mysql_fetch_row($result)) {
$wld=$a_row['wld_col_name'];
$count=$a_row['COUNT'];
data[]=array($wld=>$count);
}
I may have some of it wrong, but it should give you a head start. That link should help too. Good luck and let me know if it works.