> 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);

Wouldn't it be easier to simply do:

$result = mysql_fetch_row($sth);

And then work with the $result array? If your DB indexes are listed as
CompanyCode and CompanyDB, then use:

$result = mysql_fetch_array($sth);

Then you have your variable names like you want:

$result['CompanyCode'] and $result['CompanyDB']

-- 
--Matthew Sims
--<http://killermookie.org>

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

Reply via email to