Re: Associative Array from MySQL

2001-12-09 Thread Aragon Gouveia
How about a 2 dimensional array? If I understand you correctly wouldn't this work: $result = mysql_query("SELECT id, word, count FROM table", $db); while ($return = mysql_fetch_array($result)) { $id = $return['id']; $row[$id]['word'] = $return['word']; $row[$id]['count'] = $return['count

Re: Associative Array from MySQL

2001-12-09 Thread Jason Wong
On Monday 10 December 2001 00:36, you wrote: > I have a MySQL query that I want to draw an associative array from - > but I want the 'key' to the array to be the identifying element of > the row, and I'm stuck on how to get what I want. > > For instance: > > Each row in the result set contains an

Associative Array from MySQL

2001-12-09 Thread Nelson Goforth
I have a MySQL query that I want to draw an associative array from - but I want the 'key' to the array to be the identifying element of the row, and I'm stuck on how to get what I want. For instance: Each row in the result set contains an id number, a keyword and a count related to that keywo