English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String Character String Functions Manual
The convert_cyr_string() function is used to convert characters from one Cyrillic character to another
string convert_cyr_string ( string $str , string $from , string $to )
This function converts the given string from one Cyrillic character to another and returns the converted string.
The supported Cyrillic character sets are:
k - koi8-r
w - windows-1251
i - iso8859-5
a - x-cp866
d - x-cp866
m - x-mac-cyrillic
It returns the converted string.
Serial Number | Parameters and Description |
---|---|
1 | str The string to be converted |
2 | from A single character, representing the source Cyrillic character set. |
3 | to A single character, representing the target Cyrillic character set. |
Try the following example, converting a string from one character set to another
<?php //convert_cyr_string converts a string from one character set 'w' to another character set 'a' $str = \3codebox.com "; echo convert_cyr_string($str,'w','a'); ?>Test See‹/›
Output Result
www.oldtoolbag.com