$consulta = "SELECT clave from conexiones group by clave order by clave ASC limit 0,5 "; $rs = mysql_query($consulta); while ($row= mysql_fetch_array($rs){ echo $row[0]."</br>"; }