You are here

function countries_api_numcode_get_name in Country codes API 6

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

ISO 3166-1 numcode to country name API function

Parameters

$code: numcode to search by.

Return value

string Returns country name as a string.

File

./countries_api.module, line 170
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_numcode_get_name($code) {
  $_country = countries_api_numcode_get_country($code);
  if (!is_null($_country)) {
    return $_country[COUNTRIES_API_FORMAT_NAME];
  }
  return NULL;
}