4 * Class that lists all available countries at the moment with their codes and english names
7 * @http://www.projectpier.org/
16 static $countries = array(
17 'us' => 'United States',
19 'af' => 'Afghanistan',
22 'as' => 'American Samoa',
27 'ag' => 'Antigua and Barbuda',
45 'ba' => 'Bosnia and Herzegovina',
47 'bv' => 'Bouvet Island',
49 'io' => 'British Indian Ocean Territory',
50 'vg' => 'British Virgin Islands',
53 'bf' => 'Burkina Faso',
58 'ky' => 'Cayman Islands',
59 'cf' => 'Central African Republic',
63 'cx' => 'Christmas Island',
64 'cc' => 'Cocos Islands',
68 'ck' => 'Cook Islands',
73 'cz' => 'Czech Republic',
77 'do' => 'Dominican Republic',
81 'sv' => 'El Salvador',
82 'gq' => 'Equatorial Guinea',
86 'fk' => 'Falkland Islands',
87 'fo' => 'Faroe Islands',
91 'gf' => 'French Guiana',
92 'pf' => 'French Polynesia',
93 'tf' => 'French Southern Territories',
103 'gp' => 'Guadeloupe',
107 'gw' => 'Guinea-Bissau',
110 'hm' => 'Heard and McDonald Islands',
122 'ci' => 'Ivory Coast',
126 'kz' => 'Kazakhstan',
129 'kp' => 'North Korea',
130 'kr' => 'South Korea',
132 'kg' => 'Kyrgyzstan',
139 'li' => 'Liechtenstein',
141 'lu' => 'Luxembourg',
144 'mg' => 'Madagascar',
150 'mh' => 'Marshall Islands',
151 'mq' => 'Martinique',
152 'mr' => 'Mauritania',
156 'fm' => 'Micronesia',
160 'me' => 'Montenegro',
161 'ms' => 'Montserrat',
163 'mz' => 'Mozambique',
168 'nl' => 'Netherlands',
169 'an' => 'Netherlands Antilles',
170 'nc' => 'New Caledonia',
171 'nz' => 'New Zealand',
176 'nf' => 'Norfolk Island',
177 'mp' => 'Northern Mariana Islands',
183 'pg' => 'Papua New Guinea',
186 'ph' => 'Philippines',
187 'pn' => 'Pitcairn Island',
190 'pr' => 'Puerto Rico',
196 'gs' => 'S. Georgia and S. Sandwich Isls.',
197 'kn' => 'Saint Kitts & Nevis',
198 'lc' => 'Saint Lucia',
199 'vc' => 'Saint Vincent and The Grenadines',
201 'sm' => 'San Marino',
202 'st' => 'Sao Tome and Principe',
203 'sa' => 'Saudi Arabia',
206 'sc' => 'Seychelles',
207 'sl' => 'Sierra Leone',
211 'sp' => 'Solomon Islands',
213 'za' => 'South Africa',
216 'sh' => 'St. Helena',
217 'pm' => 'St. Pierre and Miquelon',
220 'sj' => 'Svalbard and Jan Mayen Islands',
223 'ch' => 'Switzerland',
226 'tj' => 'Tajikistan',
232 'tt' => 'Trinidad and Tobago',
235 'tm' => 'Turkmenistan',
236 'tc' => 'Turks and Caicos Islands',
238 'um' => 'U.S. Minor Outlying Islands',
241 'ae' => 'United Arab Emirates',
242 'uk' => 'United Kingdom',
244 'uz' => 'Uzbekistan',
246 'va' => 'Vatican City',
249 'vi' => 'Virgin Islands',
250 'wf' => 'Wallis and Futuna Islands',
251 'eh' => 'Western Sahara',
259 * Return array of countries
266 return self
::$countries;
270 * Find specific country by country code
273 * @param string $code
276 function getCountryNameByCode($code) {
277 return array_var(self
::$countries, $code);
278 } // getCountryNameByCode