PHP convert_cyr_string() 函数

2024 年 9 月 4 日 | 阅读 1 分钟

PHP convert_cry_string() 函数用于将一种西里尔字符集转换为另一种西里尔字符集。

语法

参数描述必需/可选
String要转换的字符串必需
from(从)指定要转换的西里尔字符集。必需
to指定要转换的西里尔字符集。必需

支持的西里尔字符集包括:

  • k - koi8-r
  • w - windows-1251
  • i - iso8859-5
  • a - x-cp866
  • d - x-cp866
  • m - x-mac-cyrillic

注意:此函数是二进制安全的。

示例 1

输出

Your String is :Hello Javatpoint! ???
By using 'convert_cyr_string()' Function : Hello Javatpoint! ?.?.?.

下一主题PHP 字符串