>-----Original Message-----
>From: Mark [mailto:[EMAIL PROTECTED]]
>Sent: 24 September 2001 09:32
>To: [EMAIL PROTECTED]
>Subject: [PHP-DB] Stupid 2-D ARRAY Question
>
>
>Stupid 2-D ARRAY Question
>
>Can any body tell me why this doesn't work?
>I can't find any help on 2D arrays in PHP3 (i know, my server wont upgrade)
>
>$count = 1;
>while ($row = mysql_fetch_array($sql_result)) {
>$query_array[$count, 1] = $row[c_id];
>$query_array[$count, 2] = $row[c_name];
>$count = $count +1;
>}

Try:

$count = 1;
while ($row = mysql_fetch_array($sql_result)) {
  $query_array[$count][1] = $row[c_id];
  $query_array[$count][2] = $row[c_name];
  $count = $count +1;
}


regards
--
Jason Wong
Gremlins Associates
www.gremlins.com.hk
Tel: +852-2573-5033
Fax: +852-2573-5851


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to