本文整理匯總了PHP中utf8::utf8ToStr方法的典型用法代碼示例。如果您正苦於以下問題:PHP utf8::utf8ToStr方法的具體用法?PHP utf8::utf8ToStr怎麽用?PHP utf8::utf8ToStr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類utf8
的用法示例。
在下文中一共展示了utf8::utf8ToStr方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: nc_utf2win
function nc_utf2win($str)
{
if (extension_loaded('mbstring')) {
return mb_convert_encoding($str, "cp1251", "UTF-8");
}
if (extension_loaded('iconv')) {
return iconv('UTF-8', 'cp1251', $str);
}
global $_UTFConverter;
if (!$_UTFConverter) {
require_once "utf8/utf8.class.php";
$_UTFConverter = new utf8(CP1251);
}
return $_UTFConverter->utf8ToStr($str);
}
示例2: switch
//resultados por debajo de la pagina actual
$page_limit = $limite_inferior;
$limitpages = $page_limit;
$page_limit = $pg + $limitpages;
switch ($_GET['catalog']) {
case 'colorpictos':
$tipo_pictograma = 10;
break;
case 'bwpictos':
$tipo_pictograma = 5;
break;
}
switch ($idioma) {
case 'RU':
$id_language = 1;
$letra = $utfConverter_ru->utf8ToStr($letra);
break;
case 'RO':
$id_language = 2;
break;
case 'AR':
$id_language = 3;
$letra = $utfConverter->utf8ToStr($letra);
break;
case 'ZH':
$id_language = 4;
break;
case 'BG':
$id_language = 5;
$letra = $utfConverter_ru->utf8ToStr($letra);
break;