$sql="SELECT nombrePaciente FROM paciente"; $result=mysql_query($sql); while($dato=mysql_fetch_array($result)){ echo $dato['nombrePaciente']; }