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获取文件扩展名的4种方法

本文实例讲述了PHP获取文件扩展名的4种方法。分享给大家供大家参考,具体如下: $filename="123.jpg"; //方法一: function get_ext($file_...

php取出数组单个值的方法

1.数组arr var_dump(arr) 值如下: array (size=3) 'delete' => array (size=3) 0 => strin...

openPNE常用方法分享

复制代码 代码如下: <?php include_partial('sidemenu',array('form'=>'asdfgasgsad'));?>这句话意思是包含...

理解PHP中的Session及对Session有效期的控制

0.什么是session?        Session的中文译名叫做“会话”,其本来的含义是指有始有终的一系列动作/消息,比...

PHP rawurlencode与urlencode函数的深入分析

问题:2个函数都是针对字符串转义使其适合做文件名。该用哪个?哪个更标准? 结论:rawurlencode遵守是94年国际标准备忘录RFC 1738,urlencode实现的是传统做法,和...