[PHP-DB] Extracting varable number of elements in a query to named arrays

2004-02-16 Thread John
I have a SELECT query with a variable number of fields being included. When I come to extract them I get the wrong result with the following type of code as it does not 'accordian down' the list of variables - $a $b etc - which I equate to the named array I am trying to extract: while(list($a,

Re: [PHP-DB] Extracting varable number of elements in a query to named arrays

2004-02-16 Thread Stuart
John wrote: addresses so that $addresss[$z]=$c; is a mismatch. Is there an entirely more adaptable way to extract the result into pre-defined array names with a variable number of fields in the query? I think you're looking for http://php.net/mysql_fetch_assoc -- Stuart -- PHP Database Mailing