RE: [PHP] MySQL result to Associative array

From: Date: Mon, 21 Oct 2002 14:25:13 +0000
Subject: RE: [PHP] MySQL result to Associative array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-120738@lists.php.net to get a copy of this message
> -----Original Message----- > From: Jacob Miller > Try using " instead of '. Variables are not resolved to > their values in > single quoted strings. > > while ($row = mysql_fetch_array($md_result)) > > { > > $md_ref=$row['md_ref']; > $md_title=$row['md_title']; > > $myarray["$md_ref"]=$md_title; > > } Genius! Thanks for that - too much looking in the wrong place I guess!

« previous php.general (#120738) next »