सहेजें this code रूप cc.php
include_once 'cc.php';
$iso_code = array_search(strtolower($country_that_you_want_to_convert), array_map('strtolower', $countrycodes)); ## easy version
या हम इस तरह समारोह बना सकते हैं:
संस्करण 1:
include_once 'cc.php';
function get_iso_code($country_that_you_want_to_convert, $countrycodes){
$iso_code = array_search(strtolower($country_that_you_want_to_convert), array_map('strtolower', $countrycodes)); ## easy version
return $iso_code;
}
संस्करण 2:
function get_iso_code($country_that_you_want_to_convert){
include_once 'cc.php';
$iso_code = array_search(strtolower($country_that_you_want_to_convert), array_map('strtolower', $countrycodes)); ## easy version
return $iso_code;
}
क्षमा करें यदि मैं गलतियाँ की। अगर केवल डाउनवोट मिला तो मुझे अपनी पोस्ट को हटाने में खुशी होगी। उम्मीद है कि यह किसी की मदद करेगा।
स्रोत
2016-12-28 22:54:53
बस [आईएसओ 3116 सूची] (http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm) डाउनलोड करें और एक साधारण लुकअप करें ... – ircmaxell