i think the best away is to make your list of country name in a array... do a loop to initialize the $array['selected'][countryname'], if set $my_country, update your array with selected country, do a loop again to print out your entire list of country name.
hope this will help
