Array of country list in PHP with Zend Framework

yipeiwu_com6年前PHP代码库
复制代码 代码如下:

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实现从远程下载文件的方法

本文实例讲述了PHP实现从远程下载文件的方法。分享给大家供大家参考。具体实现方法如下: <?php if ($_GET[xfer]) { if ($_POST[from...

PHP微信开发之微信录音临时转永久存储

最近做开发的时候碰到了这个问题,甲方希望用户在微信端的录音能够一直有效。就是随时打开好友的分享就能听到好友的录音。可在微信官方开发手册上查到微信录音文件上传后只能在微信端保留3天时间,3...

PHP简单读取xml文件的方法示例

本文实例讲述了PHP简单读取xml文件的方法。分享给大家供大家参考,具体如下: 我将软件版本更新中的版本号等数据信息存放在xml文件中,使用时将版本信息读取出来。 xml文件内容如下:...

PHP全局使用Laravel辅助函数dd

dump() 方法 全局 composer.json "require": { "squizlabs/php_codesniffer": "*", "fxp/composer...

PHP获取表单textarea数据中的换行问题

PHP获取表单textarea数据中的换行问题

测试页面代码: 复制代码 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://...