function countries_api_get_options_array in Country codes API 5
Same name and namespace in other branches
- 6 countries_api.module \countries_api_get_options_array()
Function for returning an associative array useful for FAPI select elements
Parameters
array: The first value in the array (defaults to '' => 'Please Choose')
Return value
array Returns an associative array in $country['iso2'] => $country['printable_name'] format.
1 call to countries_api_get_options_array()
- CountriesApiTest::test_countries_api_get_options_array in tests/
countries_api.test - Function to test countries_api_get_options_array results
File
- ./
countries_api.module, line 220
Code
function countries_api_get_options_array($first_element = array(
'' => 'Please Choose',
)) {
return array_merge($first_element, countries_api_get_array('iso2', 'printable_name'));
}