|
Posted by David Haynes on 04/25/06 22:17
$result[] = causes the result to be pushed onto an indexed array not an
associative array. See inline for fix.
-david-
>
> $get_res = mysql_query(QUERY);
>
> if( $res = mysql_fetch_array( $get_res ) )
> {
>
> do{
>
$result[$res['field1']] = $res['field1 value'];
>
> } while( $res = mysql_fetch_array( $get_res ) );
>
> };
>
> foreach( $result as $key => $value ){
>
> print_r($value);
>
> };
Navigation:
[Reply to this message]
|