Re: doubt regarding while loop
| From: | David Grant | Date: | Fri, 27 Jan 2006 17:26:26 +0000 |
| Subject: | Re: doubt regarding while loop | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229372@lists.php.net to get a copy of this message | ||
Suresh,
suresh kumar wrote:
> hi,
> for eg
>
> while(list(t1,t2,...)=mysql_fetch_row($result)):
> endwhile;
You could start with list($t1, $t2, ...) instead. Personally, I'd done
it without assuming mysql_fetch_row is returning an array.
Try:
$t1 = "";
$t2 = "";
while ($row = mysql_fetch_row($result)) {
list($t1, $t2) = $row;
...
}
echo $t1;
David
--
David Grant
http://www.grant.org.uk/
http://pear.php.net/package/File_Ogg 0.2.1
http://pear.php.net/package/File_XSPF 0.1.0
WANTED: Junior PHP Developer in Bristol, UK