ホームページ  >  記事  >  バックエンド開発  >  Array of country list in PHP with Zend Framework_php技巧

Array of country list in PHP with Zend Framework_php技巧

WBOY
WBOYオリジナル
2016-05-17 09:15:131287ブラウズ
复制代码 代码如下:

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 までご連絡ください。