SELECT DISTINCT field, count( field ) as num_count
FROM table WHERE something LIKE '%foo%'
GROUP BY field
then you would refer to
$get["field"];
$get["num_count"];
in the while loop
<table>
<?PHP
while ($get = mysql_fetch_array($result)){
echo "<tr><td>". $get["field"] . "</td><td>".$get["num_count"]."</td></tr>";
}
?>
</table>