Ciao a tutti,
ho questo codice:
Adesso vorrei che se nella query dovesse capitare un utente che si chiama Federico sia mostrato in grassetto..codice:$query = "SELECT id,utente FROM TABELLA order by id ASC"; $result = mysql_query($query) or die ("Errore"); while ($row = mysql_fetch_array($result)) { echo $row[id]." - ".$row[utente]." "; }
Ho fatto così ma non funziona bene...
Come posso fare?codice:$query = "SELECT id,utente FROM TABELLA order by id ASC"; $result = mysql_query($query) or die ("Errore"); while ($row = mysql_fetch_array($result)) { if($row[utente] == "Federico"){ echo $row[id]." - ".$row[utente]." "; }else{ echo $row[id]." - ".$row[utente]." "; } }
Grazie,
Ciao

Rispondi quotando
