-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On September 11, 2002 14:12, Christian Ista wrote: > Hello, > > A query return x rows, by rows there are 4 fields. I'd like to put the > result in an array, a 2 dimensions array. Could you tell me how to do > that ?
Something like this may work for you: # Connect to db, make query, etc. while( $temp = mysql_fetch_row($mysql_result_handle) ) { $array[] = array( 'key0' = array( 'keya' => $temp[0], 'keyb' => $temp[1], ), 'key1' = array( 'keya' => $temp[2], 'keyb' => $temp[3], ) ); } Good luck! - --zak -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9f6tAb6QONwsK8bIRAvjKAJwKN0yvbGaztQzZOKYiy22FMqQ5EgCeP3AH 4sGpVTTX6gUJp8fZJ8xXEfQ= =eaeg -----END PGP SIGNATURE----- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php