首頁  >  文章  >  php教程  >  Array of country list in PHP with Zend Framework

Array of country list in PHP with Zend Framework

WBOY
WBOY原創
2016-06-13 12:05:161109瀏覽

复制代码 代码如下:


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;
}

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn