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';
//EXAMPLE #1
echo '---CREATING A SELECT BOX---<br />';
$countrys = countryConversion('all');
echo "<select name='country'>";
foreach($countrys as $country){
echo "<option value='".$country['code2']."'>".$country['country']."</option>";
}
echo "</select>";
//EXAMPLE #2
echo '---CONVERTING country name TO country code---<br />';
$countryCode2 = countryConversion('Spain', 'code2');
$countryCode3 = countryConversion('Spain', 'code3');
echo "The two digit country code from 'Spain' equals ".$countryCode2."<br />";
echo "The three digit country code from 'Spain' equals ".$countryCode3;
//EXAMPLE #3
echo '---CONVERTING country code TO country name---<br />';
$countryCode2 = countryConversion('zW', 'country');
$countryCode3 = countryConversion('ZwE', 'country');
echo "The two digit country code 'zW' equals ".$countryCode2."<br />";
echo "The three digit country code 'ZwE' equals ".$countryCode3."<br />";
Supported Countrys so far:
Just in case I’ve forgot one, just let me know and I will add it asap for you.
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.
[eltd_button size=”huge-full-width” type=”outline” text=”Download & Demo Links” custom_class=”#” icon_pack=”font_awesome” fa_icon=”” link=”” target=”_blank” color=”” hover_color=”” background_color=”” hover_background_color=”” border_color=”” hover_border_color=”” font_size=”” font_weight=”” margin=””]
Demo = PHP Country List
[eltd_button size=”huge” type=”” text=”Full Live Demo” custom_class=”” icon_pack=”font_awesome” fa_icon=”fa-laptop” link=”https://codecanyon.net/item/php-country-list/8591022″ target=”_blank” color=”” hover_color=”” background_color=”” hover_background_color=”” border_color=”” hover_border_color=”” font_size=”” font_weight=”” margin=””]
Kindly Note: We update new contents like WordPress Themes, Plugins, PHP Scripts everyday. But remember that you should never use this items in a commercial website. All the contents posted here for development & testing purpose only. We’re not responsible for any damage, use at your own RISK! We highly recommend to buy PHP Country List from the The Developer ( Webklex ) website. Thank you.
Download = PHP Country List-[Updated].zip