note 20426 added to function.mysql-fetch-array
| From: | fernandezedgar at hotmail dot com | Date: | Wed, 03 Apr 2002 16:46:36 +0000 |
| Subject: | note 20426 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28543@lists.php.net to get a copy of this message | ||
Hello Im Edgar and Im having problems doing a query with fetch array when I try to print a menu list
in HTML.
I dont know how to print a list values in HTML comming fron a query.
I hope you help me plis.
This is the code:
Code________________________
$resultado1 = mysql_query("select id_proy,nombre_proy from proyecto where
proyecto.login='$Usuario'");
print "<select name='Proyecto'>";
//for ($i = 0;$line = mysql_fetch_array($resultado1);++$i)
// { //abre for
while ($line = mysql_fetch_array($resultado1)) {
$ID= $row[0];
$Nombre= $row[1];
$Valor = "<option value=";
$Valor = $Valor.$ID;
$Valor = $Valor.">";
$Valor = $Valor.$Nombre;
$Valor = $Valor."</option>";
//print "<option
value=".$ID.">".$Nombre." ".$Cliente."</option>";
echo $Valor;
} //cierra while
--
http://www.php.net/manual/en/function.mysql-fetch-array.php
http://master.php.net/manage/user-notes.php?action=edit+20426
http://master.php.net/manage/user-notes.php?action=delete+20426
http://master.php.net/manage/user-notes.php?action=reject+20426