Re: list($bar['CompanyCode'], $CompanyDB) = mysql_fetch_row($sth) fails.

From: Date: Thu, 29 Jul 2004 05:07:18 +0000
Subject: Re: list($bar['CompanyCode'], $CompanyDB) = mysql_fetch_row($sth) fails.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192154@lists.php.net to get a copy of this message
check the manual for list. It mentions using only numerical array indices for list. There is a warning on it even i beleive. Jason On Wed, 28 Jul 2004 20:47:37 -0700, Daevid Vincent <daevid@daevid.com> wrote: > Linux. PHP5. > > Why does this fail when using an array element, but using a variable will > work? Why should PHP care what the variable is I'm trying to store into? > > list($bar['CompanyCode'], $CompanyDB) = mysql_fetch_row($sth); > > But this works: > > list($foo, $CompanyDB) = SQL_ROW($sth); > > And of course I'd have the extra... > $foo = $bar['CompanyCode']; > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#192154) next »