PHP convert_cyr_string() 函數
PHP convert_cry_string() 函數用于將一個西里爾字符集轉換為另一個字符集。愛掏網 - it200.com
string convert_cyr_string ( string str , stringfrom , string $to );
參數 | 描述 | 必需/可選 |
---|---|---|
字符串 | 要轉換的字符串 | 必需 |
from | 指定要轉換的西里爾字符集。愛掏網 - it200.com | 必需 |
to | 指定要轉換的西里爾字符集。愛掏網 - it200.com | 必需 |
支持的 Cyrillic 字符集有;
- k - koi8-r
- w - windows-1251
- i - iso8859-5
- a - x-cp866
- d - x-cp866
- m - x-mac-cyrillic
注意:此函數是二進制安全的。愛掏網 - it200.com
示例1
<?php
str="Hello Javatpoint! ???";
echo "Your String is :".str;
echo "<br>"."By using 'convert_cyr_string()' Function : ".convert_cyr_string($str,'w','a');
?>
輸出:
Your String is :Hello Javatpoint! ???
By using 'convert_cyr_string()' Function : Hello Javatpoint! ?.?.?.
聲明:所有內容來自互聯網搜索結果,不保證100%準確性,僅供參考。如若本站內容侵犯了原著者的合法權益,可聯系我們進行處理。