You are here

function countries_api_iso3_get_name in Country codes API 6

Same name and namespace in other branches
  1. 5 countries_api.module \countries_api_iso3_get_name()

ISO 3166-1-alpha-3 code to country name API function

Parameters

$code: iso3 country code to search by.

Return value

string Returns country name as a string.

3 calls to countries_api_iso3_get_name()
CountriesAPITestCase::test_countries_api_iso3_get_name in tests/countries_api.test
Function to test results of countries_api_iso3_get_name()
CountriesAPITestCase::test_nullcountries_api_iso3_get_name in tests/countries_api.test
Function to test results of countries_api_iso3_get_name()
countries_api_get_name in ./countries_api.module
ISO 3166-1-alpha-#n code to country name API function

File

./countries_api.module, line 109
Countries API provides an API for official and up-to-date ISO 3166 country codes (alpha-2 and alpha-3) and names (official short names).

Code

function countries_api_iso3_get_name($code) {
  $_country = countries_api_iso3_get_country($code);
  if (!is_null($_country)) {
    return $_country[COUNTRIES_API_FORMAT_NAME];
  }
  return NULL;
}