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