Well... I think I figured out the solution to my problem.
while ($currentrow=mysql_fetch_array($result)) {
$flags[$currentrow['country']] = $currentrow['flag'];
}
I think that will work... but i haven't been able to test it yet, because i'm having trouble logging into the database.
Thanks