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 中英文语言转换类

起初想到制成XML文档形式,这样操作也起来很容易。只是看到说XML效率不怎样 再者就是不同的模板,可这样也有个小问题,有些词汇比如时间提示是不确定,与可能是minute ,day。也有可...

php获取系统变量方法小结

本文实例讲述了php获取系统变量的方法。分享给大家供大家参考。具体如下: 这里通过一些php内置函数获得各种系统变量。 $v = get_defined_vars();//返回由所有...

php下检测字符串是否是utf8编码的代码

 function is_utf8($string) {      return preg_ma...

在PHP中使用curl_init函数的说明

复制代码 代码如下: $ch = curl_init(); $c_url = 'http://www.baidu.com'; $c_url_data = "product_&type="...

同一空间绑定多个域名而实现访问不同页面的PHP代码

<?php  switch ($_SERVER["HTTP_HOST"]) {      case&...