Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PHP List of countries
<?php
$countries =
array(
"AF" => "Afghanistan",
"AL" => "Albania",
"DZ" => "Algeria",
"AS" => "American Samoa",
"AD" => "Andorra",
"AO" => "Angola",
"AI" => "Anguilla",
"AQ" => "Antarctica",
"AG" => "Antigua and Barbuda",
"AR" => "Argentina",
"AM" => "Armenia",
"AW" => "Aruba",
"AU" => "Australia",
"AT" => "Austria",
"AZ" => "Azerbaijan",
"BS" => "Bahamas",
"BH" => "Bahrain",
"BD" => "Bangladesh",
"BB" => "Barbados",
"BY" => "Belarus",
"BE" => "Belgium",
"BZ" => "Belize",
"BJ" => "Benin",
"BM" => "Bermuda",
"BT" => "Bhutan",
"BO" => "Bolivia",
"BA" => "Bosnia and Herzegovina",
"BW" => "Botswana",
"BV" => "Bouvet Island",
"BR" => "Brazil",
"IO" => "British Indian Ocean Territory",
"BN" => "Brunei Darussalam",
"BG" => "Bulgaria",
"BF" => "Burkina Faso",
"BI" => "Burundi",
"KH" => "Cambodia",
"CM" => "Cameroon",
"CA" => "Canada",
"CV" => "Cape Verde",
"KY" => "Cayman Islands",
"CF" => "Central African Republic",
"TD" => "Chad",
"CL" => "Chile",
"CN" => "China",
"CX" => "Christmas Island",
"CC" => "Cocos (Keeling) Islands",
"CO" => "Colombia",
"KM" => "Comoros",
"CG" => "Congo",
"CD" => "Congo, the Democratic Republic of the",
"CK" => "Cook Islands",
"CR" => "Costa Rica",
"CI" => "Cote D'Ivoire",
"HR" => "Croatia",
"CU" => "Cuba",
"CY" => "Cyprus",
"CZ" => "Czech Republic",
"DK" => "Denmark",
"DJ" => "Djibouti",
"DM" => "Dominica",
"DO" => "Dominican Republic",
"EC" => "Ecuador",
"EG" => "Egypt",
"SV" => "El Salvador",
"GQ" => "Equatorial Guinea",
"ER" => "Eritrea",
"EE" => "Estonia",
"ET" => "Ethiopia",
"FK" => "Falkland Islands (Malvinas)",
"FO" => "Faroe Islands",
"FJ" => "Fiji",
"FI" => "Finland",
"FR" => "France",
"GF" => "French Guiana",
"PF" => "French Polynesia",
"TF" => "French Southern Territories",
"GA" => "Gabon",
"GM" => "Gambia",
"GE" => "Georgia",
"DE" => "Germany",
"GH" => "Ghana",
"GI" => "Gibraltar",
"GR" => "Greece",
"GL" => "Greenland",
"GD" => "Grenada",
"GP" => "Guadeloupe",
"GU" => "Guam",
"GT" => "Guatemala",
"GN" => "Guinea",
"GW" => "Guinea-Bissau",
"GY" => "Guyana",
"HT" => "Haiti",
"HM" => "Heard Island and Mcdonald Islands",
"VA" => "Holy See (Vatican City State)",
"HN" => "Honduras",
"HK" => "Hong Kong",
"HU" => "Hungary",
"IS" => "Iceland",
"IN" => "India",
"ID" => "Indonesia",
"IR" => "Iran, Islamic Republic of",
"IQ" => "Iraq",
"IE" => "Ireland",
"IL" => "Israel",
"IT" => "Italy",
"JM" => "Jamaica",
"JP" => "Japan",
"JO" => "Jordan",
"KZ" => "Kazakhstan",
"KE" => "Kenya",
"KI" => "Kiribati",
"KP" => "Korea, Democratic People's Republic of",
"KR" => "Korea, Republic of",
"KW" => "Kuwait",
"KG" => "Kyrgyzstan",
"LA" => "Lao People's Democratic Republic",
"LV" => "Latvia",
"LB" => "Lebanon",
"LS" => "Lesotho",
"LR" => "Liberia",
"LY" => "Libyan Arab Jamahiriya",
"LI" => "Liechtenstein",
"LT" => "Lithuania",
"LU" => "Luxembourg",
"MO" => "Macao",
"MK" => "Macedonia, the Former Yugoslav Republic of",
"MG" => "Madagascar",
"MW" => "Malawi",
"MY" => "Malaysia",
"MV" => "Maldives",
"ML" => "Mali",
"MT" => "Malta",
"MH" => "Marshall Islands",
"MQ" => "Martinique",
"MR" => "Mauritania",
"MU" => "Mauritius",
"YT" => "Mayotte",
"MX" => "Mexico",
"FM" => "Micronesia, Federated States of",
"MD" => "Moldova, Republic of",
"MC" => "Monaco",
"MN" => "Mongolia",
"MS" => "Montserrat",
"MA" => "Morocco",
"MZ" => "Mozambique",
"MM" => "Myanmar",
"NA" => "Namibia",
"NR" => "Nauru",
"NP" => "Nepal",
"NL" => "Netherlands",
"AN" => "Netherlands Antilles",
"NC" => "New Caledonia",
"NZ" => "New Zealand",
"NI" => "Nicaragua",
"NE" => "Niger",
"NG" => "Nigeria",
"NU" => "Niue",
"NF" => "Norfolk Island",
"MP" => "Northern Mariana Islands",
"NO" => "Norway",
"OM" => "Oman",
"PK" => "Pakistan",
"PW" => "Palau",
"PS" => "Palestinian Territory, Occupied",
"PA" => "Panama",
"PG" => "Papua New Guinea",
"PY" => "Paraguay",
"PE" => "Peru",
"PH" => "Philippines",
"PN" => "Pitcairn",
"PL" => "Poland",
"PT" => "Portugal",
"PR" => "Puerto Rico",
"QA" => "Qatar",
"RE" => "Reunion",
"RO" => "Romania",
"RU" => "Russian Federation",
"RW" => "Rwanda",
"SH" => "Saint Helena",
"KN" => "Saint Kitts and Nevis",
"LC" => "Saint Lucia",
"PM" => "Saint Pierre and Miquelon",
"VC" => "Saint Vincent and the Grenadines",
"WS" => "Samoa",
"SM" => "San Marino",
"ST" => "Sao Tome and Principe",
"SA" => "Saudi Arabia",
"SN" => "Senegal",
"CS" => "Serbia and Montenegro",
"SC" => "Seychelles",
"SL" => "Sierra Leone",
"SG" => "Singapore",
"SK" => "Slovakia",
"SI" => "Slovenia",
"SB" => "Solomon Islands",
"SO" => "Somalia",
"ZA" => "South Africa",
"GS" => "South Georgia and the South Sandwich Islands",
"ES" => "Spain",
"LK" => "Sri Lanka",
"SD" => "Sudan",
"SR" => "Suriname",
"SJ" => "Svalbard and Jan Mayen",
"SZ" => "Swaziland",
"SE" => "Sweden",
"CH" => "Switzerland",
"SY" => "Syrian Arab Republic",
"TW" => "Taiwan, Province of China",
"TJ" => "Tajikistan",
"TZ" => "Tanzania, United Republic of",
"TH" => "Thailand",
"TL" => "Timor-Leste",
"TG" => "Togo",
"TK" => "Tokelau",
"TO" => "Tonga",
"TT" => "Trinidad and Tobago",
"TN" => "Tunisia",
"TR" => "Turkey",
"TM" => "Turkmenistan",
"TC" => "Turks and Caicos Islands",
"TV" => "Tuvalu",
"UG" => "Uganda",
"UA" => "Ukraine",
"AE" => "United Arab Emirates",
"GB" => "United Kingdom",
"US" => "United States",
"UM" => "United States Minor Outlying Islands",
"UY" => "Uruguay",
"UZ" => "Uzbekistan",
"VU" => "Vanuatu",
"VE" => "Venezuela",
"VN" => "Viet Nam",
"VG" => "Virgin Islands, British",
"VI" => "Virgin Islands, U.s.",
"WF" => "Wallis and Futuna",
"EH" => "Western Sahara",
"YE" => "Yemen",
"ZM" => "Zambia",
"ZW" => "Zimbabwe"
);
?>
@phillpafford

This comment has been minimized.

Copy link

commented Sep 27, 2013

providing this in JSON might be a better option:


{
    "AF": "Afghanistan",
    "AL": "Albania",
    "DZ": "Algeria",
    "AS": "American Samoa",
    "AD": "Andorra",
    "AO": "Angola",
    "AI": "Anguilla",
    "AQ": "Antarctica",
    "AG": "Antigua and Barbuda",
    "AR": "Argentina",
    "AM": "Armenia",
    "AW": "Aruba",
    "AU": "Australia",
    "AT": "Austria",
    "AZ": "Azerbaijan",
    "BS": "Bahamas",
    "BH": "Bahrain",
    "BD": "Bangladesh",
    "BB": "Barbados",
    "BY": "Belarus",
    "BE": "Belgium",
    "BZ": "Belize",
    "BJ": "Benin",
    "BM": "Bermuda",
    "BT": "Bhutan",
    "BO": "Bolivia",
    "BA": "Bosnia and Herzegovina",
    "BW": "Botswana",
    "BV": "Bouvet Island",
    "BR": "Brazil",
    "IO": "British Indian Ocean Territory",
    "BN": "Brunei Darussalam",
    "BG": "Bulgaria",
    "BF": "Burkina Faso",
    "BI": "Burundi",
    "KH": "Cambodia",
    "CM": "Cameroon",
    "CA": "Canada",
    "CV": "Cape Verde",
    "KY": "Cayman Islands",
    "CF": "Central African Republic",
    "TD": "Chad",
    "CL": "Chile",
    "CN": "China",
    "CX": "Christmas Island",
    "CC": "Cocos (Keeling) Islands",
    "CO": "Colombia",
    "KM": "Comoros",
    "CG": "Congo",
    "CD": "Congo, the Democratic Republic of the",
    "CK": "Cook Islands",
    "CR": "Costa Rica",
    "CI": "Cote D'Ivoire",
    "HR": "Croatia",
    "CU": "Cuba",
    "CY": "Cyprus",
    "CZ": "Czech Republic",
    "DK": "Denmark",
    "DJ": "Djibouti",
    "DM": "Dominica",
    "DO": "Dominican Republic",
    "EC": "Ecuador",
    "EG": "Egypt",
    "SV": "El Salvador",
    "GQ": "Equatorial Guinea",
    "ER": "Eritrea",
    "EE": "Estonia",
    "ET": "Ethiopia",
    "FK": "Falkland Islands (Malvinas)",
    "FO": "Faroe Islands",
    "FJ": "Fiji",
    "FI": "Finland",
    "FR": "France",
    "GF": "French Guiana",
    "PF": "French Polynesia",
    "TF": "French Southern Territories",
    "GA": "Gabon",
    "GM": "Gambia",
    "GE": "Georgia",
    "DE": "Germany",
    "GH": "Ghana",
    "GI": "Gibraltar",
    "GR": "Greece",
    "GL": "Greenland",
    "GD": "Grenada",
    "GP": "Guadeloupe",
    "GU": "Guam",
    "GT": "Guatemala",
    "GN": "Guinea",
    "GW": "Guinea-Bissau",
    "GY": "Guyana",
    "HT": "Haiti",
    "HM": "Heard Island and Mcdonald Islands",
    "VA": "Holy See (Vatican City State)",
    "HN": "Honduras",
    "HK": "Hong Kong",
    "HU": "Hungary",
    "IS": "Iceland",
    "IN": "India",
    "ID": "Indonesia",
    "IR": "Iran, Islamic Republic of",
    "IQ": "Iraq",
    "IE": "Ireland",
    "IL": "Israel",
    "IT": "Italy",
    "JM": "Jamaica",
    "JP": "Japan",
    "JO": "Jordan",
    "KZ": "Kazakhstan",
    "KE": "Kenya",
    "KI": "Kiribati",
    "KP": "Korea, Democratic People's Republic of",
    "KR": "Korea, Republic of",
    "KW": "Kuwait",
    "KG": "Kyrgyzstan",
    "LA": "Lao People's Democratic Republic",
    "LV": "Latvia",
    "LB": "Lebanon",
    "LS": "Lesotho",
    "LR": "Liberia",
    "LY": "Libyan Arab Jamahiriya",
    "LI": "Liechtenstein",
    "LT": "Lithuania",
    "LU": "Luxembourg",
    "MO": "Macao",
    "MK": "Macedonia, the Former Yugoslav Republic of",
    "MG": "Madagascar",
    "MW": "Malawi",
    "MY": "Malaysia",
    "MV": "Maldives",
    "ML": "Mali",
    "MT": "Malta",
    "MH": "Marshall Islands",
    "MQ": "Martinique",
    "MR": "Mauritania",
    "MU": "Mauritius",
    "YT": "Mayotte",
    "MX": "Mexico",
    "FM": "Micronesia, Federated States of",
    "MD": "Moldova, Republic of",
    "MC": "Monaco",
    "MN": "Mongolia",
    "MS": "Montserrat",
    "MA": "Morocco",
    "MZ": "Mozambique",
    "MM": "Myanmar",
    "NA": "Namibia",
    "NR": "Nauru",
    "NP": "Nepal",
    "NL": "Netherlands",
    "AN": "Netherlands Antilles",
    "NC": "New Caledonia",
    "NZ": "New Zealand",
    "NI": "Nicaragua",
    "NE": "Niger",
    "NG": "Nigeria",
    "NU": "Niue",
    "NF": "Norfolk Island",
    "MP": "Northern Mariana Islands",
    "NO": "Norway",
    "OM": "Oman",
    "PK": "Pakistan",
    "PW": "Palau",
    "PS": "Palestinian Territory, Occupied",
    "PA": "Panama",
    "PG": "Papua New Guinea",
    "PY": "Paraguay",
    "PE": "Peru",
    "PH": "Philippines",
    "PN": "Pitcairn",
    "PL": "Poland",
    "PT": "Portugal",
    "PR": "Puerto Rico",
    "QA": "Qatar",
    "RE": "Reunion",
    "RO": "Romania",
    "RU": "Russian Federation",
    "RW": "Rwanda",
    "SH": "Saint Helena",
    "KN": "Saint Kitts and Nevis",
    "LC": "Saint Lucia",
    "PM": "Saint Pierre and Miquelon",
    "VC": "Saint Vincent and the Grenadines",
    "WS": "Samoa",
    "SM": "San Marino",
    "ST": "Sao Tome and Principe",
    "SA": "Saudi Arabia",
    "SN": "Senegal",
    "CS": "Serbia and Montenegro",
    "SC": "Seychelles",
    "SL": "Sierra Leone",
    "SG": "Singapore",
    "SK": "Slovakia",
    "SI": "Slovenia",
    "SB": "Solomon Islands",
    "SO": "Somalia",
    "ZA": "South Africa",
    "GS": "South Georgia and the South Sandwich Islands",
    "ES": "Spain",
    "LK": "Sri Lanka",
    "SD": "Sudan",
    "SR": "Suriname",
    "SJ": "Svalbard and Jan Mayen",
    "SZ": "Swaziland",
    "SE": "Sweden",
    "CH": "Switzerland",
    "SY": "Syrian Arab Republic",
    "TW": "Taiwan, Province of China",
    "TJ": "Tajikistan",
    "TZ": "Tanzania, United Republic of",
    "TH": "Thailand",
    "TL": "Timor-Leste",
    "TG": "Togo",
    "TK": "Tokelau",
    "TO": "Tonga",
    "TT": "Trinidad and Tobago",
    "TN": "Tunisia",
    "TR": "Turkey",
    "TM": "Turkmenistan",
    "TC": "Turks and Caicos Islands",
    "TV": "Tuvalu",
    "UG": "Uganda",
    "UA": "Ukraine",
    "AE": "United Arab Emirates",
    "GB": "United Kingdom",
    "US": "United States",
    "UM": "United States Minor Outlying Islands",
    "UY": "Uruguay",
    "UZ": "Uzbekistan",
    "VU": "Vanuatu",
    "VE": "Venezuela",
    "VN": "Viet Nam",
    "VG": "Virgin Islands, British",
    "VI": "Virgin Islands, U.s.",
    "WF": "Wallis and Futuna",
    "EH": "Western Sahara",
    "YE": "Yemen",
    "ZM": "Zambia",
    "ZW": "Zimbabwe"
}

@crismanNoble

This comment has been minimized.

Copy link

commented Sep 27, 2013

or as an array of JSON objects:

[
    {"iso" : "AF", "country" : "Afghanistan"},
    {"iso" : "AL", "country" : "Albania"},
    {"iso" : "DZ", "country" : "Algeria"},
    {"iso" : "AS", "country" : "American Samoa"},
    {"iso" : "AD", "country" : "Andorra"},
    {"iso" : "AO", "country" : "Angola"},
    {"iso" : "AI", "country" : "Anguilla"},
    {"iso" : "AQ", "country" : "Antarctica"},
    {"iso" : "AG", "country" : "Antigua and Barbuda"},
    {"iso" : "AR", "country" : "Argentina"},
    {"iso" : "AM", "country" : "Armenia"},
    {"iso" : "AW", "country" : "Aruba"},
    {"iso" : "AU", "country" : "Australia"},
    {"iso" : "AT", "country" : "Austria"},
    {"iso" : "AZ", "country" : "Azerbaijan"},
    {"iso" : "BS", "country" : "Bahamas"},
    {"iso" : "BH", "country" : "Bahrain"},
    {"iso" : "BD", "country" : "Bangladesh"},
    {"iso" : "BB", "country" : "Barbados"},
    {"iso" : "BY", "country" : "Belarus"},
    {"iso" : "BE", "country" : "Belgium"},
    {"iso" : "BZ", "country" : "Belize"},
    {"iso" : "BJ", "country" : "Benin"},
    {"iso" : "BM", "country" : "Bermuda"},
    {"iso" : "BT", "country" : "Bhutan"},
    {"iso" : "BO", "country" : "Bolivia"},
    {"iso" : "BA", "country" : "Bosnia and Herzegovina"},
    {"iso" : "BW", "country" : "Botswana"},
    {"iso" : "BV", "country" : "Bouvet Island"},
    {"iso" : "BR", "country" : "Brazil"},
    {"iso" : "IO", "country" : "British Indian Ocean Territory"},
    {"iso" : "BN", "country" : "Brunei Darussalam"},
    {"iso" : "BG", "country" : "Bulgaria"},
    {"iso" : "BF", "country" : "Burkina Faso"},
    {"iso" : "BI", "country" : "Burundi"},
    {"iso" : "KH", "country" : "Cambodia"},
    {"iso" : "CM", "country" : "Cameroon"},
    {"iso" : "CA", "country" : "Canada"},
    {"iso" : "CV", "country" : "Cape Verde"},
    {"iso" : "KY", "country" : "Cayman Islands"},
    {"iso" : "CF", "country" : "Central African Republic"},
    {"iso" : "TD", "country" : "Chad"},
    {"iso" : "CL", "country" : "Chile"},
    {"iso" : "CN", "country" : "China"},
    {"iso" : "CX", "country" : "Christmas Island"},
    {"iso" : "CC", "country" : "Cocos (Keeling) Islands"},
    {"iso" : "CO", "country" : "Colombia"},
    {"iso" : "KM", "country" : "Comoros"},
    {"iso" : "CG", "country" : "Congo"},
    {"iso" : "CD", "country" : "Congo, the Democratic Republic of the"},
    {"iso" : "CK", "country" : "Cook Islands"},
    {"iso" : "CR", "country" : "Costa Rica"},
    {"iso" : "CI", "country" : "Cote D'Ivoire"},
    {"iso" : "HR", "country" : "Croatia"},
    {"iso" : "CU", "country" : "Cuba"},
    {"iso" : "CY", "country" : "Cyprus"},
    {"iso" : "CZ", "country" : "Czech Republic"},
    {"iso" : "DK", "country" : "Denmark"},
    {"iso" : "DJ", "country" : "Djibouti"},
    {"iso" : "DM", "country" : "Dominica"},
    {"iso" : "DO", "country" : "Dominican Republic"},
    {"iso" : "EC", "country" : "Ecuador"},
    {"iso" : "EG", "country" : "Egypt"},
    {"iso" : "SV", "country" : "El Salvador"},
    {"iso" : "GQ", "country" : "Equatorial Guinea"},
    {"iso" : "ER", "country" : "Eritrea"},
    {"iso" : "EE", "country" : "Estonia"},
    {"iso" : "ET", "country" : "Ethiopia"},
    {"iso" : "FK", "country" : "Falkland Islands (Malvinas)"},
    {"iso" : "FO", "country" : "Faroe Islands"},
    {"iso" : "FJ", "country" : "Fiji"},
    {"iso" : "FI", "country" : "Finland"},
    {"iso" : "FR", "country" : "France"},
    {"iso" : "GF", "country" : "French Guiana"},
    {"iso" : "PF", "country" : "French Polynesia"},
    {"iso" : "TF", "country" : "French Southern Territories"},
    {"iso" : "GA", "country" : "Gabon"},
    {"iso" : "GM", "country" : "Gambia"},
    {"iso" : "GE", "country" : "Georgia"},
    {"iso" : "DE", "country" : "Germany"},
    {"iso" : "GH", "country" : "Ghana"},
    {"iso" : "GI", "country" : "Gibraltar"},
    {"iso" : "GR", "country" : "Greece"},
    {"iso" : "GL", "country" : "Greenland"},
    {"iso" : "GD", "country" : "Grenada"},
    {"iso" : "GP", "country" : "Guadeloupe"},
    {"iso" : "GU", "country" : "Guam"},
    {"iso" : "GT", "country" : "Guatemala"},
    {"iso" : "GN", "country" : "Guinea"},
    {"iso" : "GW", "country" : "Guinea-Bissau"},
    {"iso" : "GY", "country" : "Guyana"},
    {"iso" : "HT", "country" : "Haiti"},
    {"iso" : "HM", "country" : "Heard Island and Mcdonald Islands"},
    {"iso" : "VA", "country" : "Holy See (Vatican City State)"},
    {"iso" : "HN", "country" : "Honduras"},
    {"iso" : "HK", "country" : "Hong Kong"},
    {"iso" : "HU", "country" : "Hungary"},
    {"iso" : "IS", "country" : "Iceland"},
    {"iso" : "IN", "country" : "India"},
    {"iso" : "ID", "country" : "Indonesia"},
    {"iso" : "IR", "country" : "Iran, Islamic Republic of"},
    {"iso" : "IQ", "country" : "Iraq"},
    {"iso" : "IE", "country" : "Ireland"},
    {"iso" : "IL", "country" : "Israel"},
    {"iso" : "IT", "country" : "Italy"},
    {"iso" : "JM", "country" : "Jamaica"},
    {"iso" : "JP", "country" : "Japan"},
    {"iso" : "JO", "country" : "Jordan"},
    {"iso" : "KZ", "country" : "Kazakhstan"},
    {"iso" : "KE", "country" : "Kenya"},
    {"iso" : "KI", "country" : "Kiribati"},
    {"iso" : "KP", "country" : "Korea, Democratic People's Republic of"},
    {"iso" : "KR", "country" : "Korea, Republic of"},
    {"iso" : "KW", "country" : "Kuwait"},
    {"iso" : "KG", "country" : "Kyrgyzstan"},
    {"iso" : "LA", "country" : "Lao People's Democratic Republic"},
    {"iso" : "LV", "country" : "Latvia"},
    {"iso" : "LB", "country" : "Lebanon"},
    {"iso" : "LS", "country" : "Lesotho"},
    {"iso" : "LR", "country" : "Liberia"},
    {"iso" : "LY", "country" : "Libyan Arab Jamahiriya"},
    {"iso" : "LI", "country" : "Liechtenstein"},
    {"iso" : "LT", "country" : "Lithuania"},
    {"iso" : "LU", "country" : "Luxembourg"},
    {"iso" : "MO", "country" : "Macao"},
    {"iso" : "MK", "country" : "Macedonia, the Former Yugoslav Republic of"},
    {"iso" : "MG", "country" : "Madagascar"},
    {"iso" : "MW", "country" : "Malawi"},
    {"iso" : "MY", "country" : "Malaysia"},
    {"iso" : "MV", "country" : "Maldives"},
    {"iso" : "ML", "country" : "Mali"},
    {"iso" : "MT", "country" : "Malta"},
    {"iso" : "MH", "country" : "Marshall Islands"},
    {"iso" : "MQ", "country" : "Martinique"},
    {"iso" : "MR", "country" : "Mauritania"},
    {"iso" : "MU", "country" : "Mauritius"},
    {"iso" : "YT", "country" : "Mayotte"},
    {"iso" : "MX", "country" : "Mexico"},
    {"iso" : "FM", "country" : "Micronesia, Federated States of"},
    {"iso" : "MD", "country" : "Moldova, Republic of"},
    {"iso" : "MC", "country" : "Monaco"},
    {"iso" : "MN", "country" : "Mongolia"},
    {"iso" : "MS", "country" : "Montserrat"},
    {"iso" : "MA", "country" : "Morocco"},
    {"iso" : "MZ", "country" : "Mozambique"},
    {"iso" : "MM", "country" : "Myanmar"},
    {"iso" : "NA", "country" : "Namibia"},
    {"iso" : "NR", "country" : "Nauru"},
    {"iso" : "NP", "country" : "Nepal"},
    {"iso" : "NL", "country" : "Netherlands"},
    {"iso" : "AN", "country" : "Netherlands Antilles"},
    {"iso" : "NC", "country" : "New Caledonia"},
    {"iso" : "NZ", "country" : "New Zealand"},
    {"iso" : "NI", "country" : "Nicaragua"},
    {"iso" : "NE", "country" : "Niger"},
    {"iso" : "NG", "country" : "Nigeria"},
    {"iso" : "NU", "country" : "Niue"},
    {"iso" : "NF", "country" : "Norfolk Island"},
    {"iso" : "MP", "country" : "Northern Mariana Islands"},
    {"iso" : "NO", "country" : "Norway"},
    {"iso" : "OM", "country" : "Oman"},
    {"iso" : "PK", "country" : "Pakistan"},
    {"iso" : "PW", "country" : "Palau"},
    {"iso" : "PS", "country" : "Palestinian Territory, Occupied"},
    {"iso" : "PA", "country" : "Panama"},
    {"iso" : "PG", "country" : "Papua New Guinea"},
    {"iso" : "PY", "country" : "Paraguay"},
    {"iso" : "PE", "country" : "Peru"},
    {"iso" : "PH", "country" : "Philippines"},
    {"iso" : "PN", "country" : "Pitcairn"},
    {"iso" : "PL", "country" : "Poland"},
    {"iso" : "PT", "country" : "Portugal"},
    {"iso" : "PR", "country" : "Puerto Rico"},
    {"iso" : "QA", "country" : "Qatar"},
    {"iso" : "RE", "country" : "Reunion"},
    {"iso" : "RO", "country" : "Romania"},
    {"iso" : "RU", "country" : "Russian Federation"},
    {"iso" : "RW", "country" : "Rwanda"},
    {"iso" : "SH", "country" : "Saint Helena"},
    {"iso" : "KN", "country" : "Saint Kitts and Nevis"},
    {"iso" : "LC", "country" : "Saint Lucia"},
    {"iso" : "PM", "country" : "Saint Pierre and Miquelon"},
    {"iso" : "VC", "country" : "Saint Vincent and the Grenadines"},
    {"iso" : "WS", "country" : "Samoa"},
    {"iso" : "SM", "country" : "San Marino"},
    {"iso" : "ST", "country" : "Sao Tome and Principe"},
    {"iso" : "SA", "country" : "Saudi Arabia"},
    {"iso" : "SN", "country" : "Senegal"},
    {"iso" : "CS", "country" : "Serbia and Montenegro"},
    {"iso" : "SC", "country" : "Seychelles"},
    {"iso" : "SL", "country" : "Sierra Leone"},
    {"iso" : "SG", "country" : "Singapore"},
    {"iso" : "SK", "country" : "Slovakia"},
    {"iso" : "SI", "country" : "Slovenia"},
    {"iso" : "SB", "country" : "Solomon Islands"},
    {"iso" : "SO", "country" : "Somalia",
    {"iso" : "ZA", "country" : "South Africa"},
    {"iso" : "GS", "country" : "South Georgia and the South Sandwich Islands"},
    {"iso" : "ES", "country" : "Spain"},
    {"iso" : "LK", "country" : "Sri Lanka"},
    {"iso" : "SD", "country" : "Sudan"},
    {"iso" : "SR", "country" : "Suriname"},
    {"iso" : "SJ", "country" : "Svalbard and Jan Mayen"},
    {"iso" : "SZ", "country" : "Swaziland"},
    {"iso" : "SE", "country" : "Sweden"},
    {"iso" : "CH", "country" : "Switzerland"},
    {"iso" : "SY", "country" : "Syrian Arab Republic"},
    {"iso" : "TW", "country" : "Taiwan, Province of China"},
    {"iso" : "TJ", "country" : "Tajikistan"},
    {"iso" : "TZ", "country" : "Tanzania, United Republic of"},
    {"iso" : "TH", "country" : "Thailand"},
    {"iso" : "TL", "country" : "Timor-Leste"},
    {"iso" : "TG", "country" : "Togo"},
    {"iso" : "TK", "country" : "Tokelau"},
    {"iso" : "TO", "country" : "Tonga"},
    {"iso" : "TT", "country" : "Trinidad and Tobago"},
    {"iso" : "TN", "country" : "Tunisia"},
    {"iso" : "TR", "country" : "Turkey"},
    {"iso" : "TM", "country" : "Turkmenistan"},
    {"iso" : "TC", "country" : "Turks and Caicos Islands"},
    {"iso" : "TV", "country" : "Tuvalu"},
    {"iso" : "UG", "country" : "Uganda"},
    {"iso" : "UA", "country" : "Ukraine"},
    {"iso" : "AE", "country" : "United Arab Emirates"},
    {"iso" : "GB", "country" : "United Kingdom"},
    {"iso" : "US", "country" : "United States"},
    {"iso" : "UM", "country" : "United States Minor Outlying Islands"},
    {"iso" : "UY", "country" : "Uruguay"},
    {"iso" : "UZ", "country" : "Uzbekistan"},
    {"iso" : "VU", "country" : "Vanuatu"},
    {"iso" : "VE", "country" : "Venezuela"},
    {"iso" : "VN", "country" : "Viet Nam"},
    {"iso" : "VG", "country" : "Virgin Islands, British"},
    {"iso" : "VI", "country" : "Virgin Islands, U.s."},
    {"iso" : "WF", "country" : "Wallis and Futuna"},
    {"iso" : "EH", "country" : "Western Sahara"},
    {"iso" : "YE", "country" : "Yemen"},
    {"iso" : "ZM", "country" : "Zambia"},
    {"iso" : "ZW", "country" : "Zimbabwe"}
]
@theY4Kman

This comment has been minimized.

Copy link

commented Sep 28, 2013

Here it is in PNG:
PHP List of Countries

@masnun

This comment has been minimized.

Copy link

commented Sep 29, 2013

Should I create the XML version? :P

I guess the first JSON version should be the appropriate one -- language independent and quite portable :)

@ShirtlessKirk

This comment has been minimized.

Copy link

commented Oct 24, 2013

Can I get the PNG version in SVG so it is scalable? That text is a bit small...

@ErvinSabic

This comment has been minimized.

Copy link

commented Jul 14, 2017

Thank you so much for your contribution!! I needed this!

@Jossnaz

This comment has been minimized.

Copy link

commented Oct 20, 2017

@crismanNoble typo behind somalia missing }

@xem

This comment has been minimized.

Copy link

commented Nov 27, 2017

The humor on this page is underrated. Thanks for the laugh!

@Fede72

This comment has been minimized.

Copy link

commented Dec 27, 2017

Hi,
do you think it will be available in future also the regions maps? I'm looking for all italy ones (Lazio, Basilicata, Lombardia and so on).

Thanks

@MyBrainNL

This comment has been minimized.

Copy link

commented Jan 10, 2018

Just pasted the PNG in the options for a selectbox on a website but it doesn't show... help!

@papiando

This comment has been minimized.

Copy link

commented Feb 2, 2019

Since 2010, the Netherlands Antilles is no longer a country, and two constituent countries were created, called Curaçao (CW) and Sint Maarten (SX). This list also lacks South Sudan (SS).

@k9t9

This comment has been minimized.

Copy link

commented Mar 15, 2019

former Swaziland Changed it's official name to eSwatini somewhere in early 2018...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.