You are here

function continents_api_get_continents in Country codes API 5

Same name and namespace in other branches
  1. 6 contrib/continents_api/continents_api.module \continents_api_get_continents()

Get all continents.

Return value

An array of (continent code, continent name) pairs.

1 call to continents_api_get_continents()
continents_api_get_countries in contrib/continents_api/continents_api.module
Function to get a region by iso2 country name

File

contrib/continents_api/continents_api.module, line 18
Continents API provides an API for official and up-to-date list of continents and their countries. Countries are provided in ISO 3166 alpha-2 country codes. Source: http://en.wikipedia.org/wiki/List_of_countries_by_continent_(data_file)

Code

function continents_api_get_continents() {
  return array(
    'AF' => t('Africa'),
    'AS' => t('Asia'),
    'EU' => t('Europe'),
    'NA' => t('North America'),
    'SA' => t('South America'),
    'OC' => t('Oceania'),
    'AN' => t('Antarctica'),
  );
}