list($bar['CompanyCode'], $CompanyDB) = mysql_fetch_row($sth) fails.
| From: | Daevid Vincent | Date: | Thu, 29 Jul 2004 03:47:37 +0000 |
| Subject: | list($bar['CompanyCode'], $CompanyDB) = mysql_fetch_row($sth) fails. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-192149@lists.php.net to get a copy of this message | ||
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'];