Re: [PHP] newbie: dynamically building associative arrays

2002-05-15 Thread 1LT John W. Holmes
Heh...you have to learn some SQL!! Try this query: SELECT term, count(*) AS cnt FROM table GROUP BY term; ---John Holmes... - Original Message - From: "ROBERT MCPEAK" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 15, 2002 2:16 PM Subject: [PH

[PHP] newbie: dynamically building associative arrays

2002-05-15 Thread ROBERT MCPEAK
I'm trying to build what I think is an associative array from a set of mySQL results. It looks like this: //First, a mySQL results loop for a select statement return unique occurrences of data in the field "term": for ($i=0; $i <$num_results; $i++) { $row = mysql_fetch_array($result); echo $