Menu
Hi,
I am doing this little loop:
[code=php]
while ($row=mysql_fetch_assoc($query))
{
$username=$row[‘username’];
$number1=$row[‘number1’];
$result[]=$username;
$result[]=$number1;
}
But I’m not getting the result I want, which is:
[code=php]
$result=array(
‘john’ => 94,
‘james’ => 45,
‘steve’ =>30)
How would you achieve that within that While loop?
Thanks a lot
Regards