function _weather_get_country_from_icao in Weather 5
Same name and namespace in other branches
- 5.6 icao_codes.inc \_weather_get_country_from_icao()
2 calls to _weather_get_country_from_icao()
- weather_custom_block in ./
weather.module - Show a configuration page for a custom weather block
- weather_custom_block_form_validate in ./
weather.module - Check the submission of the custom weather block
File
- ./
icao_codes.inc, line 44
Code
function _weather_get_country_from_icao($wanted_icao) {
$icao_codes = _weather_setup_icao_codes();
$wanted_icao = strtoupper($wanted_icao);
foreach ($icao_codes as $country => $data) {
foreach ($data as $icao => $info) {
if ($icao == $wanted_icao) {
return $country;
}
}
}
}