Looping through a records set an putting values into a multi dimensional array

From: Date: Wed, 13 Dec 2000 22:24:47 +0000
Subject: Looping through a records set an putting values into a multi dimensional array
Groups: php.general 
Request: Send a blank email to php-general+get-30191@lists.php.net to get a copy of this message
Hi, could someone please give me a solution to my following problem, I'm going nuts understanding the weird way php handles multi dimensional arrays. I'm looping through the results of a select statement I'm running. The result is returning 3 fields each time it loops, they are $user_id, $class_id and $info. What I'm trying to do is use $user_id and $class_id as my two indices for my array and place $info into the array. In most other languages I would simply do myarray($user_id, $class_id)=$info. But clearly you cant do it like that in php. Any suggestions are appreciated

« previous php.general (#30191) next »