Array of country list in PHP with Zend Framework
作者:bea
代码如下: 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($countr
代码如下:
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;
}
有用 | 无用
猜你喜欢
您可能感兴趣的文章:
- php数组函数序列之array_combine() - 数组合并函数使用说明
- php数组函数序列之in_array() 查找数组值是否存在
- php数组函数序列之array_unique() - 去除数组中重复的元素值
- php数组函数序列之array_sum() - 计算数组元素值之和
- php数组函数序列之array_key_exists() - 查找数组键名是否存在
- php数组函数序列 之array_count_values() 统计数组中所有值出现的次数函数
- php数组函数序列 之shuffle()和array_rand() 随机函数使用介绍
- 让Json更懂中文(JSON_UNESCAPED_UNICODE)
- PHP实现异步调用方法研究与分享
- 提示Trying to clone an uncloneable object of class Imagic的解决
- PHP 小心urldecode引发的SQL注入漏洞
- Session保存到数据库的php类分享
- php中批量修改文件后缀名的函数代码
- php中经典方法实现判断多维数组是否为空
- PHP禁止页面缓存的代码
- Pain 全世界最小最简单的PHP模板引擎 (普通版)
- 供参考的 php 学习提高路线分享
- PHP中的strtr函数使用介绍(str_replace)
- PHP中读写文件实现代码