RE: [PHP] Query result to an array

From: Date: Wed, 11 Sep 2002 21:21:44 +0000
Subject: RE: [PHP] Query result to an array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116036@lists.php.net to get a copy of this message
> 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] > ) > ); > } I corrected this error myself but that's not work. Why that twice ? (only the key change) 'key0' => array( 'keya' => $temp[0], 'keyb' => $temp[1] ), when I do echo($array[0][1]) I receive array unknown. Bye

« previous php.general (#116036) next »