Re: doubt regarding while loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux