PHP Code:
$field5stat = array();
$cats = $DB_site->query("SELECT DISTINCT field5 FROM " . TABLE_PREFIX . "userfield ");
$dbquery = $DB_site->query("SELECT field5 FROM " . TABLE_PREFIX . "userfield ");
while ($queryrow = $DB_site->fetch_array($dbquery))
{
while ($queryrow[field5] = $cats)
{
$field5stat['field5']++
}
}
then echo template to echo values
i just woke up so i can't check the code but i think i done something like this in another script that came out looking a bit like this.