Ver original$nombres=array(); while($row=mysql_fetch_array($registros)){ $nombres[]=$row['nombre']; } foreach($nombres as $nom) echo $nom."<br />";