-
-
Save vxnick/380904 to your computer and use it in GitHub Desktop.
<?php | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'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, Democratic Republic', | |
'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', | |
'GG' => 'Guernsey', | |
'GN' => 'Guinea', | |
'GW' => 'Guinea-Bissau', | |
'GY' => 'Guyana', | |
'HT' => 'Haiti', | |
'HM' => 'Heard Island & 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', | |
'IM' => 'Isle Of Man', | |
'IL' => 'Israel', | |
'IT' => 'Italy', | |
'JM' => 'Jamaica', | |
'JP' => 'Japan', | |
'JE' => 'Jersey', | |
'JO' => 'Jordan', | |
'KZ' => 'Kazakhstan', | |
'KE' => 'Kenya', | |
'KI' => 'Kiribati', | |
'KR' => 'Korea', | |
'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', | |
'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', | |
'MC' => 'Monaco', | |
'MN' => 'Mongolia', | |
'ME' => 'Montenegro', | |
'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', | |
'BL' => 'Saint Barthelemy', | |
'SH' => 'Saint Helena', | |
'KN' => 'Saint Kitts And Nevis', | |
'LC' => 'Saint Lucia', | |
'MF' => 'Saint Martin', | |
'PM' => 'Saint Pierre And Miquelon', | |
'VC' => 'Saint Vincent And Grenadines', | |
'WS' => 'Samoa', | |
'SM' => 'San Marino', | |
'ST' => 'Sao Tome And Principe', | |
'SA' => 'Saudi Arabia', | |
'SN' => 'Senegal', | |
'RS' => 'Serbia', | |
'SC' => 'Seychelles', | |
'SL' => 'Sierra Leone', | |
'SG' => 'Singapore', | |
'SK' => 'Slovakia', | |
'SI' => 'Slovenia', | |
'SB' => 'Solomon Islands', | |
'SO' => 'Somalia', | |
'ZA' => 'South Africa', | |
'GS' => 'South Georgia And Sandwich Isl.', | |
'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', | |
'TJ' => 'Tajikistan', | |
'TZ' => 'Tanzania', | |
'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 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', | |
); | |
?> |
YOU GUYS ARE THE BEST.. SO MUCH LOVE!!
'country_code_with_name' => [
'+1' => 'United States',
'+7' => 'Russia',
'+20' => 'Egypt',
'+27' => 'South Africa',
'+30' => 'Greece',
'+31' => 'Netherlands',
'+32' => 'Belgium',
'+33' => 'France',
'+34' => 'Spain',
'+36' => 'Hungary',
'+39' => 'Italy',
'+40' => 'Romania',
'+41' => 'Switzerland',
'+43' => 'Austria',
'+44' => 'United Kingdom',
'+45' => 'Denmark',
'+46' => 'Sweden',
'+48' => 'Poland',
'+49' => 'Germany',
'+51' => 'Peru',
'+52' => 'Mexico',
'+54' => 'Argentina',
'+55' => 'Brazil',
'+56' => 'Chile',
'+57' => 'Colombia',
'+58' => 'Venezuela',
'+60' => 'Malaysia',
'+61' => 'Australia',
'+62' => 'Indonesia',
'+63' => 'Philippines',
'+64' => 'New Zealand',
'+65' => 'Singapore',
'+66' => 'Thailand',
'+81' => 'Japan',
'+82' => 'South Korea',
'+84' => 'Vietnam',
'+86' => 'China',
'+90' => 'Turkey',
'+91' => 'India',
'+92' => 'Pakistan',
'+93' => 'Afghanistan',
'+94' => 'Sri Lanka',
'+95' => 'Myanmar',
'+98' => 'Iran',
'+143' => 'Canada',
'+212' => 'Morocco',
'+216' => 'Tunisia',
'+225' => 'Cote d\'Ivoire',
'+234' => 'Nigeria',
'+254' => 'Kenya',
'+420' => 'Czech Republic',
'+591' => 'Bolivia',
'+673' => 'Brunei',
'+678' => 'Vanuatu',
'+679' => 'Fiji',
'+682' => 'Cook Islands',
'+683' => 'Niue',
'+685' => 'Western Samoa',
'+687' => 'American Samoa',
'+688' => 'Nauru',
'+689' => 'Kiribati',
'+691' => 'Marshall Islands',
'+692' => 'Micronesia (Federated States of)',
'+694' => 'Palau',
'+698' => 'Easter Island',
'+850' => 'North Korea',
'+852' => 'Hong Kong',
'+853' => 'Macau',
'+855' => 'Cambodia',
'+886' => 'Taiwan',
'+960' => 'Maldives',
'+965' => 'Kuwait',
'+966' => 'Saudi Arabia',
'+967' => 'Yemen',
'+968' => 'Oman',
'+970' => 'Palestine',
'+971' => 'United Arab Emirates',
'+974' => 'Qatar',
'+977' => 'Nepal',
'+975' => 'Bhutan',
'+976' => 'Mongolia',
'+977' => 'Nepal',
'+992' => 'Tajikistan',
'+993' => 'Turkmenistan',
'+994' => 'Azerbaijan',
'+995' => 'Georgia',
'+996' => 'Kyrgyzstan',
'+998' => 'Uzbekistan',
],
I strongly recommend that if you're doing an implementation that requires a country list, that you do not blindly use the entire list unless it's really needed as a requirements. Too many apps are developed with- "we need a country list? ok!" and then it goes live with a list of 80+ entries in a drop-down when the actual user use case is never going to need 'Vanuatu' or 'Mayotte'. Don't ship there? Don't have customers there? Never ever will anybody using the application actually pick that country? Then get rid of it.
(And, I guess.... Check for duplicates? The list from @rehanshaikh1823 has Nepal twice.)
<?php
$countries = array(
'AF' => ['name' => 'Afghanistan', 'alpha3' => 'AFG'],
'AX' => ['name' => 'Aland Islands', 'alpha3' => 'ALA'],
'AL' => ['name' => 'Albania', 'alpha3' => 'ALB'],
'DZ' => ['name' => 'Algeria', 'alpha3' => 'DZA'],
'AS' => ['name' => 'American Samoa', 'alpha3' => 'ASM'],
'AD' => ['name' => 'Andorra', 'alpha3' => 'AND'],
'AO' => ['name' => 'Angola', 'alpha3' => 'AGO'],
'AI' => ['name' => 'Anguilla', 'alpha3' => 'AIA'],
'AQ' => ['name' => 'Antarctica', 'alpha3' => 'ATA'],
'AG' => ['name' => 'Antigua And Barbuda', 'alpha3' => 'ATG'],
'AR' => ['name' => 'Argentina', 'alpha3' => 'ARG'],
'AM' => ['name' => 'Armenia', 'alpha3' => 'ARM'],
'AW' => ['name' => 'Aruba', 'alpha3' => 'ABW'],
'AU' => ['name' => 'Australia', 'alpha3' => 'AUS'],
'AT' => ['name' => 'Austria', 'alpha3' => 'AUT'],
'AZ' => ['name' => 'Azerbaijan', 'alpha3' => 'AZE'],
'BS' => ['name' => 'Bahamas', 'alpha3' => 'BHS'],
'BH' => ['name' => 'Bahrain', 'alpha3' => 'BHR'],
'BD' => ['name' => 'Bangladesh', 'alpha3' => 'BGD'],
'BB' => ['name' => 'Barbados', 'alpha3' => 'BRB'],
'BY' => ['name' => 'Belarus', 'alpha3' => 'BLR'],
'BE' => ['name' => 'Belgium', 'alpha3' => 'BEL'],
'BZ' => ['name' => 'Belize', 'alpha3' => 'BLZ'],
'BJ' => ['name' => 'Benin', 'alpha3' => 'BEN'],
'BM' => ['name' => 'Bermuda', 'alpha3' => 'BMU'],
'BT' => ['name' => 'Bhutan', 'alpha3' => 'BTN'],
'BO' => ['name' => 'Bolivia', 'alpha3' => 'BOL'],
'BA' => ['name' => 'Bosnia And Herzegovina', 'alpha3' => 'BIH'],
'BW' => ['name' => 'Botswana', 'alpha3' => 'BWA'],
'BV' => ['name' => 'Bouvet Island', 'alpha3' => 'BVT'],
'BR' => ['name' => 'Brazil', 'alpha3' => 'BRA'],
'IO' => ['name' => 'British Indian Ocean Territory', 'alpha3' => 'IOT'],
'BN' => ['name' => 'Brunei Darussalam', 'alpha3' => 'BRN'],
'BG' => ['name' => 'Bulgaria', 'alpha3' => 'BGR'],
'BF' => ['name' => 'Burkina Faso', 'alpha3' => 'BFA'],
'BI' => ['name' => 'Burundi', 'alpha3' => 'BDI'],
'KH' => ['name' => 'Cambodia', 'alpha3' => 'KHM'],
'CM' => ['name' => 'Cameroon', 'alpha3' => 'CMR'],
'CA' => ['name' => 'Canada', 'alpha3' => 'CAN'],
'CV' => ['name' => 'Cape Verde', 'alpha3' => 'CPV'],
'KY' => ['name' => 'Cayman Islands', 'alpha3' => 'CYM'],
'CF' => ['name' => 'Central African Republic', 'alpha3' => 'CAF'],
'TD' => ['name' => 'Chad', 'alpha3' => 'TCD'],
'CL' => ['name' => 'Chile', 'alpha3' => 'CHL'],
'CN' => ['name' => 'China', 'alpha3' => 'CHN'],
'CX' => ['name' => 'Christmas Island', 'alpha3' => 'CXR'],
'CC' => ['name' => 'Cocos (Keeling) Islands', 'alpha3' => 'CCK'],
'CO' => ['name' => 'Colombia', 'alpha3' => 'COL'],
'KM' => ['name' => 'Comoros', 'alpha3' => 'COM'],
'CG' => ['name' => 'Congo', 'alpha3' => 'COG'],
'CD' => ['name' => 'Congo, Democratic Republic', 'alpha3' => 'COD'],
'CK' => ['name' => 'Cook Islands', 'alpha3' => 'COK'],
'CR' => ['name' => 'Costa Rica', 'alpha3' => 'CRI'],
'CI' => ['name' => 'Cote D\'Ivoire', 'alpha3' => 'CIV'],
'HR' => ['name' => 'Croatia', 'alpha3' => 'HRV'],
'CU' => ['name' => 'Cuba', 'alpha3' => 'CUB'],
'CY' => ['name' => 'Cyprus', 'alpha3' => 'CYP'],
'CZ' => ['name' => 'Czech Republic', 'alpha3' => 'CZE'],
'DK' => ['name' => 'Denmark', 'alpha3' => 'DNK'],
'DJ' => ['name' => 'Djibouti', 'alpha3' => 'DJI'],
'DM' => ['name' => 'Dominica', 'alpha3' => 'DMA'],
'DO' => ['name' => 'Dominican Republic', 'alpha3' => 'DOM'],
'EC' => ['name' => 'Ecuador', 'alpha3' => 'ECU'],
'EG' => ['name' => 'Egypt', 'alpha3' => 'EGY'],
'SV' => ['name' => 'El Salvador', 'alpha3' => 'SLV'],
'GQ' => ['name' => 'Equatorial Guinea', 'alpha3' => 'GNQ'],
'ER' => ['name' => 'Eritrea', 'alpha3' => 'ERI'],
'EE' => ['name' => 'Estonia', 'alpha3' => 'EST'],
'ET' => ['name' => 'Ethiopia', 'alpha3' => 'ETH'],
'FK' => ['name' => 'Falkland Islands (Malvinas)', 'alpha3' => 'FLK'],
'FO' => ['name' => 'Faroe Islands', 'alpha3' => 'FRO'],
'FJ' => ['name' => 'Fiji', 'alpha3' => 'FJI'],
'FI' => ['name' => 'Finland', 'alpha3' => 'FIN'],
'FR' => ['name' => 'France', 'alpha3' => 'FRA'],
'GF' => ['name' => 'French Guiana', 'alpha3' => 'GUF'],
'PF' => ['name' => 'French Polynesia', 'alpha3' => 'PYF'],
'TF' => ['name' => 'French Southern Territories', 'alpha3' => 'ATF'],
'GA' => ['name' => 'Gabon', 'alpha3' => 'GAB'],
'GM' => ['name' => 'Gambia', 'alpha3' => 'GMB'],
'GE' => ['name' => 'Georgia', 'alpha3' => 'GEO'],
'DE' => ['name' => 'Germany', 'alpha3' => 'DEU'],
'GH' => ['name' => 'Ghana', 'alpha3' => 'GHA'],
'GI' => ['name' => 'Gibraltar', 'alpha3' => 'GIB'],
'GR' => ['name' => 'Greece', 'alpha3' => 'GRC'],
'GL' => ['name' => 'Greenland', 'alpha3' => 'GRL'],
'GD' => ['name' => 'Grenada', 'alpha3' => 'GRD'],
'GP' => ['name' => 'Guadeloupe', 'alpha3' => 'GLP'],
'GU' => ['name' => 'Guam', 'alpha3' => 'GUM'],
'GT' => ['name' => 'Guatemala', 'alpha3' => 'GTM'],
'GG' => ['name' => 'Guernsey', 'alpha3' => 'GGY'],
'GN' => ['name' => 'Guinea', 'alpha3' => 'GIN'],
'GW' => ['name' => 'Guinea-Bissau', 'alpha3' => 'GNB'],
'GY' => ['name' => 'Guyana', 'alpha3' => 'GUY'],
'HT' => ['name' => 'Haiti', 'alpha3' => 'HTI'],
'HM' => ['name' => 'Heard Island & Mcdonald Islands', 'alpha3' => 'HMD'],
'VA' => ['name' => 'Holy See (Vatican City State)', 'alpha3' => 'VAT'],
'HN' => ['name' => 'Honduras', 'alpha3' => 'HND'],
'HK' => ['name' => 'Hong Kong', 'alpha3' => 'HKG'],
'HU' => ['name' => 'Hungary', 'alpha3' => 'HUN'],
'IS' => ['name' => 'Iceland', 'alpha3' => 'ISL'],
'IN' => ['name' => 'India', 'alpha3' => 'IND'],
'ID' => ['name' => 'Indonesia', 'alpha3' => 'IDN'],
'IR' => ['name' => 'Iran, Islamic Republic Of', 'alpha3' => 'IRN'],
'IQ' => ['name' => 'Iraq', 'alpha3' => 'IRQ'],
'IE' => ['name' => 'Ireland', 'alpha3' => 'IRL'],
'IM' => ['name' => 'Isle Of Man', 'alpha3' => 'IMN'],
'IL' => ['name' => 'Israel', 'alpha3' => 'ISR'],
'IT' => ['name' => 'Italy', 'alpha3' => 'ITA'],
'JM' => ['name' => 'Jamaica', 'alpha3' => 'JAM'],
'JP' => ['name' => 'Japan', 'alpha3' => 'JPN'],
'JE' => ['name' => 'Jersey', 'alpha3' => 'JEY'],
'JO' => ['name' => 'Jordan', 'alpha3' => 'JOR'],
'KZ' => ['name' => 'Kazakhstan', 'alpha3' => 'KAZ'],
'KE' => ['name' => 'Kenya', 'alpha3' => 'KEN'],
'KI' => ['name' => 'Kiribati', 'alpha3' => 'KIR'],
'KR' => ['name' => 'Korea', 'alpha3' => 'KOR'],
'KW' => ['name' => 'Kuwait', 'alpha3' => 'KWT'],
'KG' => ['name' => 'Kyrgyzstan', 'alpha3' => 'KGZ'],
'LA' => ['name' => 'Lao People\'s Democratic Republic', 'alpha3' => 'LAO'],
'LV' => ['name' => 'Latvia', 'alpha3' => 'LVA'],
'LB' => ['name' => 'Lebanon', 'alpha3' => 'LBN'],
'LS' => ['name' => 'Lesotho', 'alpha3' => 'LSO'],
'LR' => ['name' => 'Liberia', 'alpha3' => 'LBR'],
'LY' => ['name' => 'Libyan Arab Jamahiriya', 'alpha3' => 'LBY'],
'LI' => ['name' => 'Liechtenstein', 'alpha3' => 'LIE'],
'LT' => ['name' => 'Lithuania', 'alpha3' => 'LTU'],
'LU' => ['name' => 'Luxembourg', 'alpha3' => 'LUX'],
'MO' => ['name' => 'Macao', 'alpha3' => 'MAC'],
'MK' => ['name' => 'Macedonia', 'alpha3' => 'MKD'],
'MG' => ['name' => 'Madagascar', 'alpha3' => 'MDG'],
'MW' => ['name' => 'Malawi', 'alpha3' => 'MWI'],
'MY' => ['name' => 'Malaysia', 'alpha3' => 'MYS'],
'MV' => ['name' => 'Maldives', 'alpha3' => 'MDV'],
'ML' => ['name' => 'Mali', 'alpha3' => 'MLI'],
'MT' => ['name' => 'Malta', 'alpha3' => 'MLT'],
'MH' => ['name' => 'Marshall Islands', 'alpha3' => 'MHL'],
'MQ' => ['name' => 'Martinique', 'alpha3' => 'MTQ'],
'MR' => ['name' => 'Mauritania', 'alpha3' => 'MRT'],
'MU' => ['name' => 'Mauritius', 'alpha3' => 'MUS'],
'YT' => ['name' => 'Mayotte', 'alpha3' => 'MYT'],
'MX' => ['name' => 'Mexico', 'alpha3' => 'MEX'],
'FM' => ['name' => 'Micronesia, Federated States Of', 'alpha3' => 'FSM'],
'MD' => ['name' => 'Moldova', 'alpha3' => 'MDA'],
'MC' => ['name' => 'Monaco', 'alpha3' => 'MCO'],
'MN' => ['name' => 'Mongolia', 'alpha3' => 'MNG'],
'ME' => ['name' => 'Montenegro', 'alpha3' => 'MNE'],
'MS' => ['name' => 'Montserrat', 'alpha3' => 'MSR'],
'MA' => ['name' => 'Morocco', 'alpha3' => 'MAR'],
'MZ' => ['name' => 'Mozambique', 'alpha3' => 'MOZ'],
'MM' => ['name' => 'Myanmar', 'alpha3' => 'MMR'],
'NA' => ['name' => 'Namibia', 'alpha3' => 'NAM'],
'NR' => ['name' => 'Nauru', 'alpha3' => 'NRU'],
'NP' => ['name' => 'Nepal', 'alpha3' => 'NPL'],
'NL' => ['name' => 'Netherlands', 'alpha3' => 'NLD'],
'AN' => ['name' => 'Netherlands Antilles', 'alpha3' => 'ANT'],
'NC' => ['name' => 'New Caledonia', 'alpha3' => 'NCL'],
'NZ' => ['name' => 'New Zealand', 'alpha3' => 'NZL'],
'NI' => ['name' => 'Nicaragua', 'alpha3' => 'NIC'],
'NE' => ['name' => 'Niger', 'alpha3' => 'NER'],
'NG' => ['name' => 'Nigeria', 'alpha3' => 'NGA'],
'NU' => ['name' => 'Niue', 'alpha3' => 'NIU'],
'NF' => ['name' => 'Norfolk Island', 'alpha3' => 'NFK'],
'MP' => ['name' => 'Northern Mariana Islands', 'alpha3' => 'MNP'],
'NO' => ['name' => 'Norway', 'alpha3' => 'NOR'],
'OM' => ['name' => 'Oman', 'alpha3' => 'OMN'],
'PK' => ['name' => 'Pakistan', 'alpha3' => 'PAK'],
'PW' => ['name' => 'Palau', 'alpha3' => 'PLW'],
'PS' => ['name' => 'Palestinian Territory, Occupied', 'alpha3' => 'PSE'],
'PA' => ['name' => 'Panama', 'alpha3' => 'PAN'],
'PG' => ['name' => 'Papua New Guinea', 'alpha3' => 'PNG'],
'PY' => ['name' => 'Paraguay', 'alpha3' => 'PRY'],
'PE' => ['name' => 'Peru', 'alpha3' => 'PER'],
'PH' => ['name' => 'Philippines', 'alpha3' => 'PHL'],
'PN' => ['name' => 'Pitcairn', 'alpha3' => 'PCN'],
'PL' => ['name' => 'Poland', 'alpha3' => 'POL'],
'PT' => ['name' => 'Portugal', 'alpha3' => 'PRT'],
'PR' => ['name' => 'Puerto Rico', 'alpha3' => 'PRI'],
'QA' => ['name' => 'Qatar', 'alpha3' => 'QAT'],
'RE' => ['name' => 'Reunion', 'alpha3' => 'REU'],
'RO' => ['name' => 'Romania', 'alpha3' => 'ROU'],
'RU' => ['name' => 'Russian Federation', 'alpha3' => 'RUS'],
'RW' => ['name' => 'Rwanda', 'alpha3' => 'RWA'],
'BL' => ['name' => 'Saint Barthelemy', 'alpha3' => 'BLM'],
'SH' => ['name' => 'Saint Helena', 'alpha3' => 'SHN'],
'KN' => ['name' => 'Saint Kitts And Nevis', 'alpha3' => 'KNA'],
'LC' => ['name' => 'Saint Lucia', 'alpha3' => 'LCA'],
'MF' => ['name' => 'Saint Martin', 'alpha3' => 'MAF'],
'PM' => ['name' => 'Saint Pierre And Miquelon', 'alpha3' => 'SPM'],
'VC' => ['name' => 'Saint Vincent And Grenadines', 'alpha3' => 'VCT'],
'WS' => ['name' => 'Samoa', 'alpha3' => 'WSM'],
'SM' => ['name' => 'San Marino', 'alpha3' => 'SMR'],
'ST' => ['name' => 'Sao Tome And Principe', 'alpha3' => 'STP'],
'SA' => ['name' => 'Saudi Arabia', 'alpha3' => 'SAU'],
'SN' => ['name' => 'Senegal', 'alpha3' => 'SEN'],
'RS' => ['name' => 'Serbia', 'alpha3' => 'SRB'],
'SC' => ['name' => 'Seychelles', 'alpha3' => 'SYC'],
'SL' => ['name' => 'Sierra Leone', 'alpha3' => 'SLE'],
'SG' => ['name' => 'Singapore', 'alpha3' => 'SGP'],
'SK' => ['name' => 'Slovakia', 'alpha3' => 'SVK'],
'SI' => ['name' => 'Slovenia', 'alpha3' => 'SVN'],
'SB' => ['name' => 'Solomon Islands', 'alpha3' => 'SLB'],
'SO' => ['name' => 'Somalia', 'alpha3' => 'SOM'],
'ZA' => ['name' => 'South Africa', 'alpha3' => 'ZAF'],
'GS' => ['name' => 'South Georgia And Sandwich Isl.', 'alpha3' => 'SGS'],
'ES' => ['name' => 'Spain', 'alpha3' => 'ESP'],
'LK' => ['name' => 'Sri Lanka', 'alpha3' => 'LKA'],
'SD' => ['name' => 'Sudan', 'alpha3' => 'SDN'],
'SR' => ['name' => 'Suriname', 'alpha3' => 'SUR'],
'SJ' => ['name' => 'Svalbard And Jan Mayen', 'alpha3' => 'SJM'],
'SZ' => ['name' => 'Swaziland', 'alpha3' => 'SWZ'],
'SE' => ['name' => 'Sweden', 'alpha3' => 'SWE'],
'CH' => ['name' => 'Switzerland', 'alpha3' => 'CHE'],
'SY' => ['name' => 'Syrian Arab Republic', 'alpha3' => 'SYR'],
'TW' => ['name' => 'Taiwan', 'alpha3' => 'TWN'],
'TJ' => ['name' => 'Tajikistan', 'alpha3' => 'TJK'],
'TZ' => ['name' => 'Tanzania', 'alpha3' => 'TZA'],
'TH' => ['name' => 'Thailand', 'alpha3' => 'THA'],
'TL' => ['name' => 'Timor-Leste', 'alpha3' => 'TLS'],
'TG' => ['name' => 'Togo', 'alpha3' => 'TGO'],
'TK' => ['name' => 'Tokelau', 'alpha3' => 'TKL'],
'TO' => ['name' => 'Tonga', 'alpha3' => 'TON'],
'TT' => ['name' => 'Trinidad And Tobago', 'alpha3' => 'TTO'],
'TN' => ['name' => 'Tunisia', 'alpha3' => 'TUN'],
'TR' => ['name' => 'Turkey', 'alpha3' => 'TUR'],
'TM' => ['name' => 'Turkmenistan', 'alpha3' => 'TKM'],
'TC' => ['name' => 'Turks And Caicos Islands', 'alpha3' => 'TCA'],
'TV' => ['name' => 'Tuvalu', 'alpha3' => 'TUV'],
'UG' => ['name' => 'Uganda', 'alpha3' => 'UGA'],
'UA' => ['name' => 'Ukraine', 'alpha3' => 'UKR'],
'AE' => ['name' => 'United Arab Emirates', 'alpha3' => 'ARE'],
'GB' => ['name' => 'United Kingdom', 'alpha3' => 'GBR'],
'US' => ['name' => 'United States', 'alpha3' => 'USA'],
'UM' => ['name' => 'United States Outlying Islands', 'alpha3' => 'UMI'],
'UY' => ['name' => 'Uruguay', 'alpha3' => 'URY'],
'UZ' => ['name' => 'Uzbekistan', 'alpha3' => 'UZB'],
'VU' => ['name' => 'Vanuatu', 'alpha3' => 'VUT'],
'VE' => ['name' => 'Venezuela', 'alpha3' => 'VEN'],
'VN' => ['name' => 'Viet Nam', 'alpha3' => 'VNM'],
'VG' => ['name' => 'Virgin Islands, British', 'alpha3' => 'VGB'],
'VI' => ['name' => 'Virgin Islands, U.S.', 'alpha3' => 'VIR'],
'WF' => ['name' => 'Wallis And Futuna', 'alpha3' => 'WLF'],
'EH' => ['name' => 'Western Sahara', 'alpha3' => 'ESH'],
'YE' => ['name' => 'Yemen', 'alpha3' => 'YEM'],
'ZM' => ['name' => 'Zambia', 'alpha3' => 'ZMB'],
'ZW' => ['name' => 'Zimbabwe', 'alpha3' => 'ZWE']
];
?>
country abrev and phone code in javascript
countryCodes = [ { 'AD': {'name': 'ANDORRA','code': '376'} }, { 'AE': {'name': 'UNITED ARAB EMIRATES','code': '971'} }, { 'AF': {'name': 'AFGHANISTAN','code': '93'} }, { 'AG': {'name': 'ANTIGUA AND BARBUDA','code': '1268'} }, { 'AI': {'name': 'ANGUILLA','code': '1264'} }, { 'AL': {'name': 'ALBANIA','code': '355'} }, { 'AM': {'name': 'ARMENIA','code': '374'} }, { 'AN': {'name': 'NETHERLANDS ANTILLES','code': '599'} }, { 'AO': {'name': 'ANGOLA','code': '244'} }, { 'AQ': {'name': 'ANTARCTICA','code': '672'} }, { 'AR': {'name': 'ARGENTINA','code': '54'} }, { 'AS': {'name': 'AMERICAN SAMOA','code': '1684'} }, { 'AT': {'name': 'AUSTRIA','code': '43'} }, { 'AU': {'name': 'AUSTRALIA','code': '61'} }, { 'AW': {'name': 'ARUBA','code': '297'} }, { 'AZ': {'name': 'AZERBAIJAN','code': '994'} }, { 'BA': {'name': 'BOSNIA AND HERZEGOVINA','code': '387'} }, { 'BB': {'name': 'BARBADOS','code': '1246'} }, { 'BD': {'name': 'BANGLADESH','code': '880'} }, { 'BE': {'name': 'BELGIUM','code': '32'} }, { 'BF': {'name': 'BURKINA FASO','code': '226'} }, { 'BG': {'name': 'BULGARIA','code': '359'} }, { 'BH': {'name': 'BAHRAIN','code': '973'} }, { 'BI': {'name': 'BURUNDI','code': '257'} }, { 'BJ': {'name': 'BENIN','code': '229'} }, { 'BL': {'name': 'SAINT BARTHELEMY','code': '590'} }, { 'BM': {'name': 'BERMUDA','code': '1441'} }, { 'BN': {'name': 'BRUNEI DARUSSALAM','code': '673'} }, { 'BO': {'name': 'BOLIVIA','code': '591'} }, { 'BR': {'name': 'BRAZIL','code': '55'} }, { 'BS': {'name': 'BAHAMAS','code': '1242'} }, { 'BT': {'name': 'BHUTAN','code': '975'} }, { 'BW': {'name': 'BOTSWANA','code': '267'} }, { 'BY': {'name': 'BELARUS','code': '375'} }, { 'BZ': {'name': 'BELIZE','code': '501'} }, { 'CA': {'name': 'CANADA','code': '1'} }, { 'CC': {'name': 'COCOS (KEELING) ISLANDS','code': '61'} }, { 'CD': {'name': 'CONGO, THE DEMOCRATIC REPUBLIC OF THE','code': '243'} }, { 'CF': {'name': 'CENTRAL AFRICAN REPUBLIC','code': '236'} }, { 'CG': {'name': 'CONGO','code': '242'} }, { 'CH': {'name': 'SWITZERLAND','code': '41'} }, { 'CI': {'name': 'COTE D IVOIRE','code': '225'} }, { 'CK': {'name': 'COOK ISLANDS','code': '682'} }, { 'CL': {'name': 'CHILE','code': '56'} }, { 'CM': {'name': 'CAMEROON','code': '237'} }, { 'CN': {'name': 'CHINA','code': '86'} }, { 'CO': {'name': 'COLOMBIA','code': '57'} }, { 'CR': {'name': 'COSTA RICA','code': '506'} }, { 'CU': {'name': 'CUBA','code': '53'} }, { 'CV': {'name': 'CAPE VERDE','code': '238'} }, { 'CX': {'name': 'CHRISTMAS ISLAND','code': '61'} }, { 'CY': {'name': 'CYPRUS','code': '357'} }, { 'CZ': {'name': 'CZECH REPUBLIC','code': '420'} }, { 'DE': {'name': 'GERMANY','code': '49'} }, { 'DJ': {'name': 'DJIBOUTI','code': '253'} }, { 'DK': {'name': 'DENMARK','code': '45'} }, { 'DM': {'name': 'DOMINICA','code': '1767'} }, { 'DO': {'name': 'DOMINICAN REPUBLIC','code': '1809'} }, { 'DZ': {'name': 'ALGERIA','code': '213'} }, { 'EC': {'name': 'ECUADOR','code': '593'} }, { 'EE': {'name': 'ESTONIA','code': '372'} }, { 'EG': {'name': 'EGYPT','code': '20'} }, { 'ER': {'name': 'ERITREA','code': '291'} }, { 'ES': {'name': 'SPAIN','code': '34'} }, { 'ET': {'name': 'ETHIOPIA','code': '251'} }, { 'FI': {'name': 'FINLAND','code': '358'} }, { 'FJ': {'name': 'FIJI','code': '679'} }, { 'FK': {'name': 'FALKLAND ISLANDS (MALVINAS)','code': '500'} }, { 'FM': {'name': 'MICRONESIA, FEDERATED STATES OF','code': '691'} }, { 'FO': {'name': 'FAROE ISLANDS','code': '298'} }, { 'FR': {'name': 'FRANCE','code': '33'} }, { 'GA': {'name': 'GABON','code': '241'} }, { 'GB': {'name': 'UNITED KINGDOM','code': '44'} }, { 'GD': {'name': 'GRENADA','code': '1473'} }, { 'GE': {'name': 'GEORGIA','code': '995'} }, { 'GH': {'name': 'GHANA','code': '233'} }, { 'GI': {'name': 'GIBRALTAR','code': '350'} }, { 'GL': {'name': 'GREENLAND','code': '299'} }, { 'GM': {'name': 'GAMBIA','code': '220'} }, { 'GN': {'name': 'GUINEA','code': '224'} }, { 'GQ': {'name': 'EQUATORIAL GUINEA','code': '240'} }, { 'GR': {'name': 'GREECE','code': '30'} }, { 'GT': {'name': 'GUATEMALA','code': '502'} }, { 'GU': {'name': 'GUAM','code': '1671'} }, { 'GW': {'name': 'GUINEA-BISSAU','code': '245'} }, { 'GY': {'name': 'GUYANA','code': '592'} }, { 'HK': {'name': 'HONG KONG','code': '852'} }, { 'HN': {'name': 'HONDURAS','code': '504'} }, { 'HR': {'name': 'CROATIA','code': '385'} }, { 'HT': {'name': 'HAITI','code': '509'} }, { 'HU': {'name': 'HUNGARY','code': '36'} }, { 'ID': {'name': 'INDONESIA','code': '62'} }, { 'IE': {'name': 'IRELAND','code': '353'} }, { 'IL': {'name': 'ISRAEL','code': '972'} }, { 'IM': {'name': 'ISLE OF MAN','code': '44'} }, { 'IN': {'name': 'INDIA','code': '91'} }, { 'IQ': {'name': 'IRAQ','code': '964'} }, { 'IR': {'name': 'IRAN, ISLAMIC REPUBLIC OF','code': '98'} }, { 'IS': {'name': 'ICELAND','code': '354'} }, { 'IT': {'name': 'ITALY','code': '39'} }, { 'JM': {'name': 'JAMAICA','code': '1876'} }, { 'JO': {'name': 'JORDAN','code': '962'} }, { 'JP': {'name': 'JAPAN','code': '81'} }, { 'KE': {'name': 'KENYA','code': '254'} }, { 'KG': {'name': 'KYRGYZSTAN','code': '996'} }, { 'KH': {'name': 'CAMBODIA','code': '855'} }, { 'KI': {'name': 'KIRIBATI','code': '686'} }, { 'KM': {'name': 'COMOROS','code': '269'} }, { 'KN': {'name': 'SAINT KITTS AND NEVIS','code': '1869'} }, { 'KP': {'name': 'KOREA DEMOCRATIC PEOPLES REPUBLIC OF','code': '850'} }, { 'KR': {'name': 'KOREA REPUBLIC OF','code': '82'} }, { 'KW': {'name': 'KUWAIT','code': '965'} }, { 'KY': {'name': 'CAYMAN ISLANDS','code': '1345'} }, { 'KZ': {'name': 'KAZAKSTAN','code': '7'} }, { 'LA': {'name': 'LAO PEOPLES DEMOCRATIC REPUBLIC','code': '856'} }, { 'LB': {'name': 'LEBANON','code': '961'} }, { 'LC': {'name': 'SAINT LUCIA','code': '1758'} }, { 'LI': {'name': 'LIECHTENSTEIN','code': '423'} }, { 'LK': {'name': 'SRI LANKA','code': '94'} }, { 'LR': {'name': 'LIBERIA','code': '231'} }, { 'LS': {'name': 'LESOTHO','code': '266'} }, { 'LT': {'name': 'LITHUANIA','code': '370'} }, { 'LU': {'name': 'LUXEMBOURG','code': '352'} }, { 'LV': {'name': 'LATVIA','code': '371'} }, { 'LY': {'name': 'LIBYAN ARAB JAMAHIRIYA','code': '218'} }, { 'MA': {'name': 'MOROCCO','code': '212'} }, { 'MC': {'name': 'MONACO','code': '377'} }, { 'MD': {'name': 'MOLDOVA, REPUBLIC OF','code': '373'} }, { 'ME': {'name': 'MONTENEGRO','code': '382'} }, { 'MF': {'name': 'SAINT MARTIN','code': '1599'} }, { 'MG': {'name': 'MADAGASCAR','code': '261'} }, { 'MH': {'name': 'MARSHALL ISLANDS','code': '692'} }, { 'MK': {'name': 'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF','code': '389'} }, { 'ML': {'name': 'MALI','code': '223'} }, { 'MM': {'name': 'MYANMAR','code': '95'} }, { 'MN': {'name': 'MONGOLIA','code': '976'} }, { 'MO': {'name': 'MACAU','code': '853'} }, { 'MP': {'name': 'NORTHERN MARIANA ISLANDS','code': '1670'} }, { 'MR': {'name': 'MAURITANIA','code': '222'} }, { 'MS': {'name': 'MONTSERRAT','code': '1664'} }, { 'MT': {'name': 'MALTA','code': '356'} }, { 'MU': {'name': 'MAURITIUS','code': '230'} }, { 'MV': {'name': 'MALDIVES','code': '960'} }, { 'MW': {'name': 'MALAWI','code': '265'} }, { 'MX': {'name': 'MEXICO','code': '52'} }, { 'MY': {'name': 'MALAYSIA','code': '60'} }, { 'MZ': {'name': 'MOZAMBIQUE','code': '258'} }, { 'NA': {'name': 'NAMIBIA','code': '264'} }, { 'NC': {'name': 'NEW CALEDONIA','code': '687'} }, { 'NE': {'name': 'NIGER','code': '227'} }, { 'NG': {'name': 'NIGERIA','code': '234'} }, { 'NI': {'name': 'NICARAGUA','code': '505'} }, { 'NL': {'name': 'NETHERLANDS','code': '31'} }, { 'NO': {'name': 'NORWAY','code': '47'} }, { 'NP': {'name': 'NEPAL','code': '977'} }, { 'NR': {'name': 'NAURU','code': '674'} }, { 'NU': {'name': 'NIUE','code': '683'} }, { 'NZ': {'name': 'NEW ZEALAND','code': '64'} }, { 'OM': {'name': 'OMAN','code': '968'} }, { 'PA': {'name': 'PANAMA','code': '507'} }, { 'PE': {'name': 'PERU','code': '51'} }, { 'PF': {'name': 'FRENCH POLYNESIA','code': '689'} }, { 'PG': {'name': 'PAPUA NEW GUINEA','code': '675'} }, { 'PH': {'name': 'PHILIPPINES','code': '63'} }, { 'PK': {'name': 'PAKISTAN','code': '92'} }, { 'PL': {'name': 'POLAND','code': '48'} }, { 'PM': {'name': 'SAINT PIERRE AND MIQUELON','code': '508'} }, { 'PN': {'name': 'PITCAIRN','code': '870'} }, { 'PR': {'name': 'PUERTO RICO','code': '1'} }, { 'PT': {'name': 'PORTUGAL','code': '351'} }, { 'PW': {'name': 'PALAU','code': '680'} }, { 'PY': {'name': 'PARAGUAY','code': '595'} }, { 'QA': {'name': 'QATAR','code': '974'} }, { 'RO': {'name': 'ROMANIA','code': '40'} }, { 'RS': {'name': 'SERBIA','code': '381'} }, { 'RU': {'name': 'RUSSIAN FEDERATION','code': '7'} }, { 'RW': {'name': 'RWANDA','code': '250'} }, { 'SA': {'name': 'SAUDI ARABIA','code': '966'} }, { 'SB': {'name': 'SOLOMON ISLANDS','code': '677'} }, { 'SC': {'name': 'SEYCHELLES','code': '248'} }, { 'SD': {'name': 'SUDAN','code': '249'} }, { 'SE': {'name': 'SWEDEN','code': '46'} }, { 'SG': {'name': 'SINGAPORE','code': '65'} }, { 'SH': {'name': 'SAINT HELENA','code': '290'} }, { 'SI': {'name': 'SLOVENIA','code': '386'} }, { 'SK': {'name': 'SLOVAKIA','code': '421'} }, { 'SL': {'name': 'SIERRA LEONE','code': '232'} }, { 'SM': {'name': 'SAN MARINO','code': '378'} }, { 'SN': {'name': 'SENEGAL','code': '221'} }, { 'SO': {'name': 'SOMALIA','code': '252'} }, { 'SR': {'name': 'SURINAME','code': '597'} }, { 'ST': {'name': 'SAO TOME AND PRINCIPE','code': '239'} }, { 'SV': {'name': 'EL SALVADOR','code': '503'} }, { 'SY': {'name': 'SYRIAN ARAB REPUBLIC','code': '963'} }, { 'SZ': {'name': 'SWAZILAND','code': '268'} }, { 'TC': {'name': 'TURKS AND CAICOS ISLANDS','code': '1649'} }, { 'TD': {'name': 'CHAD','code': '235'} }, { 'TG': {'name': 'TOGO','code': '228'} }, { 'TH': {'name': 'THAILAND','code': '66'} }, { 'TJ': {'name': 'TAJIKISTAN','code': '992'} }, { 'TK': {'name': 'TOKELAU','code': '690'} }, { 'TL': {'name': 'TIMOR-LESTE','code': '670'} }, { 'TM': {'name': 'TURKMENISTAN','code': '993'} }, { 'TN': {'name': 'TUNISIA','code': '216'} }, { 'TO': {'name': 'TONGA','code': '676'} }, { 'TR': {'name': 'TURKEY','code': '90'} }, { 'TT': {'name': 'TRINIDAD AND TOBAGO','code': '1868'} }, { 'TV': {'name': 'TUVALU','code': '688'} }, { 'TW': {'name': 'TAIWAN, PROVINCE OF CHINA','code': '886'} }, { 'TZ': {'name': 'TANZANIA, UNITED REPUBLIC OF','code': '255'} }, { 'UA': {'name': 'UKRAINE','code': '380'} }, { 'UG': {'name': 'UGANDA','code': '256'} }, { 'US': {'name': 'UNITED STATES','code': '1'} }, { 'UY': {'name': 'URUGUAY','code': '598'} }, { 'UZ': {'name': 'UZBEKISTAN','code': '998'} }, { 'VA': {'name': 'HOLY SEE (VATICAN CITY STATE)','code': '39'} }, { 'VC': {'name': 'SAINT VINCENT AND THE GRENADINES','code': '1784'} }, { 'VE': {'name': 'VENEZUELA','code': '58'} }, { 'VG': {'name': 'VIRGIN ISLANDS, BRITISH','code': '1284'} }, { 'VI': {'name': 'VIRGIN ISLANDS, U.S.','code': '1340'} }, { 'VN': {'name': 'VIET NAM','code': '84'} }, { 'VU': {'name': 'VANUATU','code': '678'} }, { 'WF': {'name': 'WALLIS AND FUTUNA','code': '681'} }, { 'WS': {'name': 'SAMOA','code': '685'} }, { 'XK': {'name': 'KOSOVO','code': '381'} }, { 'YE': {'name': 'YEMEN','code': '967'} }, { 'YT': {'name': 'MAYOTTE','code': '262'} }, { 'ZA': {'name': 'SOUTH AFRICA','code': '27'} }, { 'ZM': {'name': 'ZAMBIA','code': '260'} }, { 'ZW': {'name': 'ZIMBABWE','code': '263'} } ];
Thank you, this is what I was looking for especially because of the phone codes.
JSON, combination of continents and 2 letter country codes
{
"Afghanistan": {
"continent": "Asia",
"code": "AF"
},
"Albania": {
"continent": "Europe",
"code": "AL"
},
"Algeria": {
"continent": "Africa",
"code": "DZ"
},
"American Samoa": {
"continent": "Oceania",
"code": "AS"
},
"Andorra": {
"continent": "Europe",
"code": "AD"
},
"Angola": {
"continent": "Africa",
"code": "AO"
},
"Anguilla": {
"continent": "North America",
"code": "AI"
},
"Antarctica": {
"continent": "Antarctica",
"code": "AQ"
},
"Antigua and Barbuda": {
"continent": "North America",
"code": "AG"
},
"Argentina": {
"continent": "South America",
"code": "AR"
},
"Armenia": {
"continent": "Asia",
"code": "AM"
},
"Aruba": {
"continent": "North America",
"code": "AW"
},
"Australia": {
"continent": "Oceania",
"code": "AU"
},
"Austria": {
"continent": "Europe",
"code": "AT"
},
"Azerbaijan": {
"continent": "Asia",
"code": "AZ"
},
"Bahamas": {
"continent": "North America",
"code": "BS"
},
"Bahrain": {
"continent": "Asia",
"code": "BH"
},
"Bangladesh": {
"continent": "Asia",
"code": "BD"
},
"Barbados": {
"continent": "North America",
"code": "BB"
},
"Belarus": {
"continent": "Europe",
"code": "BY"
},
"Belgium": {
"continent": "Europe",
"code": "BE"
},
"Belize": {
"continent": "North America",
"code": "BZ"
},
"Benin": {
"continent": "Africa",
"code": "BJ"
},
"Bermuda": {
"continent": "North America",
"code": "BM"
},
"Bhutan": {
"continent": "Asia",
"code": "BT"
},
"Bolivia": {
"continent": "South America",
"code": "BO"
},
"Bosnia and Herzegovina": {
"continent": "Europe",
"code": "BA"
},
"Botswana": {
"continent": "Africa",
"code": "BW"
},
"Bouvet Island": {
"continent": "Antarctica",
"code": "BV"
},
"Brazil": {
"continent": "South America",
"code": "BR"
},
"British Indian Ocean Territory": {
"continent": "Africa",
"code": "IO"
},
"Brunei": {
"continent": "Asia",
"code": "BN"
},
"Bulgaria": {
"continent": "Europe",
"code": "BG"
},
"Burkina Faso": {
"continent": "Africa",
"code": "BF"
},
"Burundi": {
"continent": "Africa",
"code": "BI"
},
"Cambodia": {
"continent": "Asia",
"code": "KH"
},
"Cameroon": {
"continent": "Africa",
"code": "CM"
},
"Canada": {
"continent": "North America",
"code": "CA"
},
"Cape Verde": {
"continent": "Africa",
"code": "CV"
},
"Cayman Islands": {
"continent": "North America",
"code": "KY"
},
"Central African Republic": {
"continent": "Africa",
"code": "CF"
},
"Chad": {
"continent": "Africa",
"code": "TD"
},
"Chile": {
"continent": "South America",
"code": "CL"
},
"China": {
"continent": "Asia",
"code": "CN"
},
"Christmas Island": {
"continent": "Oceania",
"code": "CX"
},
"Cocos (Keeling) Islands": {
"continent": "Oceania",
"code": "CC"
},
"Colombia": {
"continent": "South America",
"code": "CO"
},
"Comoros": {
"continent": "Africa",
"code": "KM"
},
"Congo (Democratic Republic)": {
"continent": "Africa",
"code": "CD"
},
"Congo (Republic)": {
"continent": "Africa",
"code": "CG"
},
"Cook Islands": {
"continent": "Oceania",
"code": "CK"
},
"Costa Rica": {
"continent": "North America",
"code": "CR"
},
"Croatia": {
"continent": "Europe",
"code": "HR"
},
"Cuba": {
"continent": "North America",
"code": "CU"
},
"Cyprus": {
"continent": "Asia",
"code": "CY"
},
"Czech Republic": {
"continent": "Europe",
"code": "CZ"
},
"Denmark": {
"continent": "Europe",
"code": "DK"
},
"Djibouti": {
"continent": "Africa",
"code": "DJ"
},
"Dominica": {
"continent": "North America",
"code": "DM"
},
"Dominican Republic": {
"continent": "North America",
"code": "DO"
},
"East Timor": {
"continent": "Asia",
"code": "TL"
},
"Ecuador": {
"continent": "South America",
"code": "EC"
},
"Egypt": {
"continent": "Africa",
"code": "EG"
},
"El Salvador": {
"continent": "North America",
"code": "SV"
},
"England": {
"continent": "Europe",
"code": "GB-ENG"
},
"Equatorial Guinea": {
"continent": "Africa",
"code": "GQ"
},
"Eritrea": {
"continent": "Africa",
"code": "ER"
},
"Estonia": {
"continent": "Europe",
"code": "EE"
},
"Ethiopia": {
"continent": "Africa",
"code": "ET"
},
"Falkland Islands": {
"continent": "South America",
"code": "FK"
},
"Faroe Islands": {
"continent": "Europe",
"code": "FO"
},
"Fiji Islands": {
"continent": "Oceania",
"code": "FJ"
},
"Finland": {
"continent": "Europe",
"code": "FI"
},
"France": {
"continent": "Europe",
"code": "FR"
},
"French Guiana": {
"continent": "South America",
"code": "GF"
},
"French Polynesia": {
"continent": "Oceania",
"code": "PF"
},
"French Southern Territories": {
"continent": "Antarctica",
"code": "TF"
},
"Gabon": {
"continent": "Africa",
"code": "GA"
},
"Gambia": {
"continent": "Africa",
"code": "GM"
},
"Georgia": {
"continent": "Asia",
"code": "GE"
},
"Germany": {
"continent": "Europe",
"code": "DE"
},
"Ghana": {
"continent": "Africa",
"code": "GH"
},
"Gibraltar": {
"continent": "Europe",
"code": "GI"
},
"Greece": {
"continent": "Europe",
"code": "GR"
},
"Greenland": {
"continent": "North America",
"code": "GL"
},
"Grenada": {
"continent": "North America",
"code": "GD"
},
"Guadeloupe": {
"continent": "North America",
"code": "GP"
},
"Guam": {
"continent": "Oceania",
"code": "GU"
},
"Guatemala": {
"continent": "North America",
"code": "GT"
},
"Guinea": {
"continent": "Africa",
"code": "GN"
},
"Guinea-Bissau": {
"continent": "Africa",
"code": "GW"
},
"Guyana": {
"continent": "South America",
"code": "GY"
},
"Haiti": {
"continent": "North America",
"code": "HT"
},
"Heard Island and McDonald Islands": {
"continent": "Antarctica",
"code": "HM"
},
"Vatican City State": {
"continent": "Europe",
"code": "VA"
},
"Honduras": {
"continent": "North America",
"code": "HN"
},
"Hong Kong": {
"continent": "Asia",
"code": "HK"
},
"Hungary": {
"continent": "Europe",
"code": "HU"
},
"Iceland": {
"continent": "Europe",
"code": "IS"
},
"India": {
"continent": "Asia",
"code": "IN"
},
"Indonesia": {
"continent": "Asia",
"code": "ID"
},
"Iran": {
"continent": "Asia",
"code": "IR"
},
"Iraq": {
"continent": "Asia",
"code": "IQ"
},
"Ireland (Republic)": {
"continent": "Europe",
"code": "IE"
},
"Israel": {
"continent": "Asia",
"code": "IL"
},
"Italy": {
"continent": "Europe",
"code": "IT"
},
"Ivory Coast": {
"continent": "Africa",
"code": "CI"
},
"Jamaica": {
"continent": "North America",
"code": "JM"
},
"Japan": {
"continent": "Asia",
"code": "JP"
},
"Jordan": {
"continent": "Asia",
"code": "JO"
},
"Kazakhstan": {
"continent": "Asia",
"code": "KZ"
},
"Kenya": {
"continent": "Africa",
"code": "KE"
},
"Kiribati": {
"continent": "Oceania",
"code": "KI"
},
"Kuwait": {
"continent": "Asia",
"code": "KW"
},
"Kyrgyzstan": {
"continent": "Asia",
"code": "KG"
},
"Laos": {
"continent": "Asia",
"code": "LA"
},
"Latvia": {
"continent": "Europe",
"code": "LV"
},
"Lebanon": {
"continent": "Asia",
"code": "LB"
},
"Lesotho": {
"continent": "Africa",
"code": "LS"
},
"Liberia": {
"continent": "Africa",
"code": "LR"
},
"Libyan Arab Jamahiriya": {
"continent": "Africa",
"code": "LY"
},
"Liechtenstein": {
"continent": "Europe",
"code": "LI"
},
"Lithuania": {
"continent": "Europe",
"code": "LT"
},
"Luxembourg": {
"continent": "Europe",
"code": "LU"
},
"Macao": {
"continent": "Asia",
"code": "MO"
},
"North Macedonia": {
"continent": "Europe",
"code": "MK"
},
"Madagascar": {
"continent": "Africa",
"code": "MG"
},
"Malawi": {
"continent": "Africa",
"code": "MW"
},
"Malaysia": {
"continent": "Asia",
"code": "MY"
},
"Maldives": {
"continent": "Asia",
"code": "MV"
},
"Mali": {
"continent": "Africa",
"code": "ML"
},
"Malta": {
"continent": "Europe",
"code": "MT"
},
"Marshall Islands": {
"continent": "Oceania",
"code": "MH"
},
"Martinique": {
"continent": "North America",
"code": "MQ"
},
"Mauritania": {
"continent": "Africa",
"code": "MR"
},
"Mauritius": {
"continent": "Africa",
"code": "MU"
},
"Mayotte": {
"continent": "Africa",
"code": "YT"
},
"Mexico": {
"continent": "North America",
"code": "MX"
},
"Micronesia, Federated States of": {
"continent": "Oceania",
"code": "FM"
},
"Moldova": {
"continent": "Europe",
"code": "MD"
},
"Monaco": {
"continent": "Europe",
"code": "MC"
},
"Mongolia": {
"continent": "Asia",
"code": "MN"
},
"Montenegro": {
"continent": "Europe",
"code": "ME"
},
"Montserrat": {
"continent": "North America",
"code": "MS"
},
"Morocco": {
"continent": "Africa",
"code": "MA"
},
"Mozambique": {
"continent": "Africa",
"code": "MZ"
},
"Myanmar": {
"continent": "Asia",
"code": "MM"
},
"Namibia": {
"continent": "Africa",
"code": "NA"
},
"Nauru": {
"continent": "Oceania",
"code": "NR"
},
"Nepal": {
"continent": "Asia",
"code": "NP"
},
"Netherlands": {
"continent": "Europe",
"code": "NL"
},
"Netherlands Antilles": {
"continent": "North America",
"code": "AN"
},
"New Caledonia": {
"continent": "Oceania",
"code": "NC"
},
"New Zealand": {
"continent": "Oceania",
"code": "NZ"
},
"Nicaragua": {
"continent": "North America",
"code": "NI"
},
"Niger": {
"continent": "Africa",
"code": "NE"
},
"Nigeria": {
"continent": "Africa",
"code": "NG"
},
"Niue": {
"continent": "Oceania",
"code": "NU"
},
"Norfolk Island": {
"continent": "Oceania",
"code": "NF"
},
"North Korea": {
"continent": "Asia",
"code": "KP"
},
"Northern Ireland": {
"continent": "Europe",
"code": "GB-NIR"
},
"Northern Mariana Islands": {
"continent": "Oceania",
"code": "MP"
},
"Norway": {
"continent": "Europe",
"code": "NO"
},
"Oman": {
"continent": "Asia",
"code": "OM"
},
"Pakistan": {
"continent": "Asia",
"code": "PK"
},
"Palau": {
"continent": "Oceania",
"code": "PW"
},
"Panama": {
"continent": "North America",
"code": "PA"
},
"Papua New Guinea": {
"continent": "Oceania",
"code": "PG"
},
"Paraguay": {
"continent": "South America",
"code": "PY"
},
"Peru": {
"continent": "South America",
"code": "PE"
},
"Philippines": {
"continent": "Asia",
"code": "PH"
},
"Pitcairn": {
"continent": "Oceania",
"code": "PN"
},
"Poland": {
"continent": "Europe",
"code": "PL"
},
"Portugal": {
"continent": "Europe",
"code": "PT"
},
"Puerto Rico": {
"continent": "North America",
"code": "PR"
},
"Qatar": {
"continent": "Asia",
"code": "QA"
},
"Reunion": {
"continent": "Africa",
"code": "RE"
},
"Romania": {
"continent": "Europe",
"code": "RO"
},
"Russian Federation": {
"continent": "Europe",
"code": "RU"
},
"Rwanda": {
"continent": "Africa",
"code": "RW"
},
"Saint Helena": {
"continent": "Africa",
"code": "SH"
},
"Saint Kitts and Nevis": {
"continent": "North America",
"code": "KN"
},
"Saint Lucia": {
"continent": "North America",
"code": "LC"
},
"Saint Pierre and Miquelon": {
"continent": "North America",
"code": "PM"
},
"Saint Vincent and the Grenadines": {
"continent": "North America",
"code": "VC"
},
"Samoa": {
"continent": "Oceania",
"code": "WS"
},
"San Marino": {
"continent": "Europe",
"code": "SM"
},
"Sao Tome and Principe": {
"continent": "Africa",
"code": "ST"
},
"Saudi Arabia": {
"continent": "Asia",
"code": "SA"
},
"Scotland": {
"continent": "Europe",
"code": "GB"
},
"Senegal": {
"continent": "Africa",
"code": "SN"
},
"Serbia": {
"continent": "Europe",
"code": "RS"
},
"Seychelles": {
"continent": "Africa",
"code": "SC"
},
"Sierra Leone": {
"continent": "Africa",
"code": "SL"
},
"Singapore": {
"continent": "Asia",
"code": "SG"
},
"Slovakia": {
"continent": "Europe",
"code": "SK"
},
"Slovenia": {
"continent": "Europe",
"code": "SI"
},
"Solomon Islands": {
"continent": "Oceania",
"code": "SB"
},
"Somalia": {
"continent": "Africa",
"code": "SO"
},
"South Africa": {
"continent": "Africa",
"code": "ZA"
},
"South Georgia and the South Sandwich Islands": {
"continent": "Antarctica",
"code": "GS"
},
"South Korea": {
"continent": "Asia",
"code": "KR"
},
"South Sudan": {
"continent": "Africa",
"code": "SS"
},
"Spain": {
"continent": "Europe",
"code": "ES"
},
"Sri Lanka": {
"continent": "Asia",
"code": "LK"
},
"Sudan": {
"continent": "Africa",
"code": "SD"
},
"Suriname": {
"continent": "South America",
"code": "SR"
},
"Svalbard and Jan Mayen": {
"continent": "Europe",
"code": "SJ"
},
"Swaziland": {
"continent": "Africa",
"code": "SZ"
},
"Sweden": {
"continent": "Europe",
"code": "SE"
},
"Switzerland": {
"continent": "Europe",
"code": "CH"
},
"Syria": {
"continent": "Asia",
"code": "SY"
},
"Tajikistan": {
"continent": "Asia",
"code": "TJ"
},
"Tanzania": {
"continent": "Africa",
"code": "TZ"
},
"Thailand": {
"continent": "Asia",
"code": "TH"
},
"Togo": {
"continent": "Africa",
"code": "TG"
},
"Tokelau": {
"continent": "Oceania",
"code": "TK"
},
"Tonga": {
"continent": "Oceania",
"code": "TO"
},
"Trinidad and Tobago": {
"continent": "North America",
"code": "TT"
},
"Tunisia": {
"continent": "Africa",
"code": "TN"
},
"Turkey": {
"continent": "Asia",
"code": "TR"
},
"Turkmenistan": {
"continent": "Asia",
"code": "TM"
},
"Turks and Caicos Islands": {
"continent": "North America",
"code": "TC"
},
"Tuvalu": {
"continent": "Oceania",
"code": "TV"
},
"Uganda": {
"continent": "Africa",
"code": "UG"
},
"Ukraine": {
"continent": "Europe",
"code": "UA"
},
"United Arab Emirates": {
"continent": "Asia",
"code": "AE"
},
"United Kingdom": {
"continent": "Europe",
"code": "GB"
},
"United States": {
"continent": "North America",
"code": "US"
},
"United States Minor Outlying Islands": {
"continent": "Oceania",
"code": "UM"
},
"Uruguay": {
"continent": "South America",
"code": "UY"
},
"Uzbekistan": {
"continent": "Asia",
"code": "UZ"
},
"Vanuatu": {
"continent": "Oceania",
"code": "VU"
},
"Venezuela": {
"continent": "South America",
"code": "VE"
},
"Vietnam": {
"continent": "Asia",
"code": "VN"
},
"Virgin Islands (British)": {
"continent": "North America",
"code": "VG"
},
"Virgin Islands (US)": {
"continent": "North America",
"code": "VI"
},
"Wales": {
"continent": "Europe",
"code": "GB"
},
"Wallis and Futuna": {
"continent": "Oceania",
"code": "WF"
},
"Western Sahara": {
"continent": "Africa",
"code": "EH"
},
"Yemen": {
"continent": "Asia",
"code": "YE"
},
"Zambia": {
"continent": "Africa",
"code": "ZM"
},
"Zimbabwe": {
"continent": "Africa",
"code": "ZW"
}
}
This gist is so funny, it's just lines upon lines of text in different formats
Very helpful too!
Pretty useless now with the AI's around :(
Just again yesterday I was on a site where they had a dropdown with country values that none of their customers will ever use. The issue isn't getting the list, it's that developers get crappy requirements.
Thanks. If somebody needs only the list of codes then,
$countryCodes = ['AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CA', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KR', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP', 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'BL', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL', 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'US', 'UM', 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW'];