Thursday, May 10, 2012

Country code to Country name lookup table (PHP Array)

I knew you will be seraching for it, so i created it for you :)

$countryLookupArray = array();

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


print_r($countryLookupArray);


No comments:

Post a Comment