It’s probably failing because Andorra
isn’t a key in $evn_timezone
.
Can you var_dump($evn_timezone);
so we can see what that contains?
You can also add checks such as:
if(isset($evn_timezone[$country->name])) {
selected($evn_timezone["$country->name"], esc_attr("$country->name"), false);
}
That way, if the country isn’t in the array, you won’t get an error.