当前位置:Gxlcms > PHP教程 > ArrayofcountrylistinPHPwithZendFramework_php技巧

ArrayofcountrylistinPHPwithZendFramework_php技巧

时间:2021-07-01 10:21:17 帮助过:6人阅读

代码如下:

public static function countryList($local)
{
$locale = new Zend_Locale('en_US');
$countries = ($locale->getTranslationList('Territory', $local, 2));
asort($countries, SORT_LOCALE_STRING);

$countries = array_combine($countries, $countries);

return $countries;
}

人气教程排行