This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

The Location Lists helper is useful when dealing with countries or states/provinces.


Loading the Helper

$ch = Loader::helper('lists/countries');


$countries = $ch->getCountries()

Returns an array of countries. The two-digit ISO country code is the key of each item in the array, with the full country name as its value.

	$countries = $ch->getCountries(); 	print $countries['US'];

$countryName = $ch->getCountryName($index)

Get a country full name given its index.

print $ch->getCountryName('UK');


Loading the Helper

$sh = Loader::helper('lists/states_provinces'); 


$sh->getStateProvinceName($stateProvince, $country)

Gets the full name of a state/province given its abbreviation $stateProvince, and the $country abbreviation.


Gets the array of state/provinces for a given $country abbreviation. Sorts in alphabetical order.


Returns the full associate array of all states/provinces.

Loading Conversation