The PHP Country List function allows you to convert country codes to names or names to country codes. Supported are 237 Countrys.

Example Code:


//Require the function
require_once 'countrycodelist.php';

/*EXAMPLES*/
var_dump(countryConversion('all')); //Returns all countrys -> return array

var_dump(countryConversion('zimBabWe')); //Entering the country name (Dont worry about capilizing) -> return Array

var_dump(countryConversion('zW')); //Two digit country code -> return Array

var_dump(countryConversion('ZwE')); //Three digit country code -> return Array

var_dump(countryConversion('ZwE', 'country')); //Three digit country code -> return String
var_dump(countryConversion('ZwE', 'code2')); //Three digit country code -> return String
var_dump(countryConversion('ZwE', 'code3')); //Three digit country code -> return String

var_dump(countryConversion('Example')); //Not existing -> returns NULL

Supported Countrys:

AF, 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, BR, IO, VG, BN, BG, BF, MM, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CK, CR, HR, CU, CY, CZ, CD, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, PF, GA, GM, , GE, DE, GH, GI, GR, GL, GD, GU, GT, GN, GW, GY, HT, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, CI, JM, JP, JE, JO, KZ, KE, KI, , KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, NA, NR, NP, NL, AN, NC, NZ, NI, NE, NG, NU, NFK, KP, MP, NO, OM, PK, PW, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, CG, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SK, SI, SB, SO, ZA, KR, 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, UY, VI, UZ, VU, VE, VN, WF, , EH, YE, ZM, ZW

Updates:

Updates are free to anyone who has purchased this item with any type of license.

Support:

Feel free to suggest new features, ask questions, and anything else related to this item by sending me an email.