Ciao a tutti
avrei un problemino con una selecr distinct
estraggo da un db tutti i record in maniera da avere una lista di nomi non duplicati:
E fin qui tutto ok,Codice PHP:
// QUERY PER GENERARE LA LISTA SOTTOCATEGORIE NN DUPLICATE
$query = "SELECT DISTINCT sottocat FROM prodotti_n WHERE categoria = 1 ORDER BY sottocat ASC";
$result = mysql_query($query,$conn);
while ($array = mysql_fetch_assoc($result)) {
echo "$array[sottocat] - ";
}
il mio problema e' che genero una lista per comporre un menu' in orizzontale che divide ogni voce con un semplice -
Come faccio a non far visuallizare nell'ultimo record il - ??
In modo da avere una lista cosi':
Abc - Abcd - Abcde - Abcdef
invece che cosi':
Abc - Abcd - Abcde - Abcdef -
![]()
Ciao e grazie tante
Micky