I'm trying to have mysql outputting a list of article categories. there are lots of articles, each with preset categories that are stored in mysql. But many articles have the same category, so my list get very long with similar category results. My idea is that if the user has posted 1 post in a category, the category gets listed. but this needs to understand that the category should just be listed once even if the user has posted multiple times in that specific category. How can i do this?
This is what i got, but not working:
foreach( $result as $row ) {
if($result>1){
$kategorilink= "{$row['kategori']}";
echo $kategorilink;
}
}