PHP Country Code Array

I spent awhile searching for a PHP array of the 3 character country codes and name to use for a dropdown, but could not find one formatted well. So I did some VIM-fu with some PHP and here it is:

array(
"AND" => "Andorra",
"ARE" => "United arab emirates",
"AFG" => "Afghanistan",
"ATG" => "Antigua and barbuda",
"ALB" => "Albania",
"ARM" => "Armenia",
"AGO" => "Angola",
"ATA" => "Antarctica",
"ARG" => "Argentina",
"AUT" => "Austria",
"AUS" => "Australia",
"ABW" => "Aruba",
"AZE" => "Azerbaijan",
"BIH" => "Bosnia and herzegovina",
"BRB" => "Barbados",
"BGD" => "Bangladesh",
"BEL" => "Belgium",
"BFA" => "Burkina faso",
"BGR" => "Bulgaria",
"BHR" => "Bahrain",
"BDI" => "Burundi",
"BEN" => "Benin",
"BMU" => "Bermuda",
"BRN" => "Brunei darussalam",
"BOL" => "Bolivia",
"BRA" => "Brazil",
"BHS" => "Bahamas",
"BTN" => "Bhutan",
"BWA" => "Botswana",
"BLR" => "Belarus",
"BLZ" => "Belize",
"CAN" => "Canada",
"COD" => "Congo, democratic republic of the",
"CAF" => "Central african republic",
"COG" => "Congo",
"CHE" => "Switzerland",
"CIV" => "Cote d'ivoire",
"CHL" => "Chile",
"CMR" => "Cameroon",
"CHN" => "China",
"COL" => "Colombia",
"CRI" => "Costa rica",
"CUB" => "Cuba",
"CPV" => "Cape verde",
"CYP" => "Cyprus",
"CZE" => "Czech republic",
"DEU" => "Germany",
"DJI" => "Djibouti",
"DNK" => "Denmark",
"DMA" => "Dominica",
"DOM" => "Dominican republic",
"DZA" => "Algeria",
"ECU" => "Ecuador",
"EST" => "Estonia",
"EGY" => "Egypt",
"ESH" => "Western sahara",
"ERI" => "Eritrea",
"ESP" => "Spain",
"ETH" => "Ethiopia",
"FIN" => "Finland",
"FJI" => "Fiji",
"FSM" => "Micronesia, federated states of",
"FRO" => "Faroe islands",
"FRA" => "France",
"GAB" => "Gabon",
"GBR" => "United kingdom",
"GRD" => "Grenada",
"GEO" => "Georgia",
"GUF" => "French guiana",
"GHA" => "Ghana",
"GMB" => "Gambia",
"GIN" => "Guinea",
"GLP" => "Guadeloupe",
"GNQ" => "Equatorial guinea",
"GRC" => "Greece",
"GTM" => "Guatemala",
"GNB" => "Guinea-bissau",
"GUY" => "Guyana",
"HND" => "Honduras",
"HRV" => "Croatia",
"HTI" => "Haiti",
"HUN" => "Hungary",
"IDN" => "Indonesia",
"IRL" => "Ireland",
"ISR" => "Israel",
"IND" => "India",
"IOT" => "British indian ocean territory",
"IRQ" => "Iraq",
"IRN" => "Iran, islamic republic of",
"ISL" => "Iceland",
"ITA" => "Italy",
"JEY" => "Jersey",
"JAM" => "Jamaica",
"JOR" => "Jordan",
"JPN" => "Japan",
"KEN" => "Kenya",
"KGZ" => "Kyrgyzstan",
"KHM" => "Cambodia",
"KIR" => "Kiribati",
"COM" => "Comoros",
"KNA" => "Saint kitts and nevis",
"PRK" => "Korea, democratic people's republic of",
"KOR" => "Korea, republic of",
"KWT" => "Kuwait",
"KAZ" => "Kazakhstan",
"LAO" => "Lao people's democratic republic",
"LBN" => "Lebanon",
"LCA" => "Saint lucia",
"LIE" => "Liechtenstein",
"LKA" => "Sri lanka",
"LBR" => "Liberia",
"LSO" => "Lesotho",
"LTU" => "Lithuania",
"LUX" => "Luxembourg",
"LVA" => "Latvia",
"LBY" => "Libyan arab jamahiriya",
"MAR" => "Morocco",
"MCO" => "Monaco",
"MDA" => "Moldova",
"MNE" => "Montenegro",
"MDG" => "Madagascar",
"MKD" => "Macedonia, the former yugoslav republic of",
"MLI" => "Mali",
"MMR" => "Myanmar",
"MNG" => "Mongolia",
"MAC" => "Macau",
"MTQ" => "Martinique",
"MRT" => "Mauritania",
"MSR" => "Montserrat",
"MUS" => "Mauritius",
"MDV" => "Maldives",
"MWI" => "Malawi",
"MEX" => "Mexico",
"MYS" => "Malaysia",
"MOZ" => "Mozambique",
"NAM" => "Namibia",
"NER" => "Niger",
"NGA" => "Nigeria",
"NIC" => "Nicaragua",
"NLD" => "Netherlands",
"NOR" => "Norway",
"NPL" => "Nepal",
"NZL" => "New zealand",
"OMN" => "Oman",
"PAN" => "Panama",
"PER" => "Peru",
"PNG" => "Papua new guinea",
"PHL" => "Philippines",
"PAK" => "Pakistan",
"POL" => "Poland",
"PSE" => "Palestinian territory",
"PRT" => "Portugal",
"PLW" => "Palau",
"PRY" => "Paraguay",
"QAT" => "Qatar",
"REU" => "Reunion",
"ROU" => "Romania",
"SRB" => "Serbia",
"RUS" => "Russian federation",
"RWA" => "Rwanda",
"SAU" => "Saudi arabia",
"SLB" => "Solomon islands",
"SYC" => "Seychelles",
"SDN" => "Sudan",
"SWE" => "Sweden",
"SHN" => "Saint helena",
"SVN" => "Slovenia",
"SVK" => "Slovakia",
"SLE" => "Sierra leone",
"SMR" => "San marino",
"SEN" => "Senegal",
"SOM" => "Somalia",
"SUR" => "Suriname",
"STP" => "Sao tome and principe",
"SLV" => "El salvador",
"SYR" => "Syrian arab republic",
"SWZ" => "Swaziland",
"TCD" => "Chad",
"ATF" => "French southern territories",
"TGO" => "Togo",
"THA" => "Thailand",
"TJK" => "Tajikistan",
"TLS" => "Timor-leste (east timor)",
"TKM" => "Turkmenistan",
"TUN" => "Tunisia",
"TUR" => "Turkey",
"TTO" => "Trinidad and tobago",
"TWN" => "Taiwan, province of china",
"TZA" => "Tanzania, united republic of",
"UKR" => "Ukraine",
"UGA" => "Uganda",
"USA" => "United states",
"URY" => "Uruguay",
"UZB" => "Uzbekistan",
"VCT" => "Saint vincent and the grenadines",
"VEN" => "Venezuela",
"VNM" => "Vietnam",
"VUT" => "Vanuatu",
"YEM" => "Yemen",
"ZAF" => "South africa",
"ZMB" => "Zambia",
"ZWE" => "Zimbabwe",
);

  1. No comments yet.

  1. No trackbacks yet.