Personal I have a product registration table and in it I have categories:
$consulta = mysql_query('select categoria from produtos order by categoria');
while ($var=mysql_fetch_array($consulta))
{
echo "<a href='editar.php?categoria=$var[categoria]'>$var[categoria]</a><br><br>";
}
The problem is that it brings me like this:
-Bebidas
-Bebidas
-Higiene e Limpeza
-Higiene e Limpeza
-Mercearia
-Padaria e Confeitaria
How to leave only one title of the Category and not duplicate as it is getting. Thank you!