You are here

function countries_api_iso2_get_iso3 in Country codes API 5

Same name and namespace in other branches
  1. 6 countries_api.module \countries_api_iso2_get_iso3()

ISO 3166-1-alpha-2 code to ISO 3166-1-alpha-3 code API function

Parameters

$code: iso2 country code to search by.

Return value

string Returns iso3 string value of country

1 call to countries_api_iso2_get_iso3()
CountriesApiTest::test_countries_api_iso2_get_iso3 in tests/countries_api.test
Function to test countries_api_iso2_get_iso3() results

File

./countries_api.module, line 117

Code

function countries_api_iso2_get_iso3($code) {
  $_country = countries_api_iso2_get_country($code);
  if (!is_null($_country)) {
    return $_country['iso3'];
  }
  return null;
}