Forum Moderators: coopster
Just a quick questions. I'm retrieving two fields from a database one being "id" and the other "name". I am currently using this to load the results
$i=0;
while($row = $db->fetchArray($results)) {
nameArray[$i] = $row;
$i++;
Which fetches the results by Association and gives me these results:
Array (
[0] => Array ( [id] => id1 [name] => FirstName )
[1] => Array ( [id] => id2 [name] => SecondName )
)
is there some way to modify the code so I get this result:
Array (
[id1] => FirstName
[id2] => SecondName
)
It seeem like it should be possible but I just can't seem to work it out.
Thanks in advance
-Harvs-