PHP convert_cyr_string() Function
PHP convert_cyr_string() Function
The convert_cyr_string() function in PHP converts from one Cyrillic character-set to another.
The supported characters set are given below:
- k - koi8-r
- w - windows-1251
- i - iso8859-5
- a - x-cp866
- d - x-cp866
- m - x-mac-cyrillic
Syntax
convert_cyr_string ( string $str , string $from , string $to )
Parameter
str(required)- This parameter represents the string to be converted.
from(required)- It signifies the source Cyrillic character set, as a single character.
to(required)- This signifies The target Cyrillic character set, as a single character.
Return
This method returns the converted string.
Example 1
Output
Original String:Is PHP easy to learn! ??? After using the 'convert_cyr_string()' Function New string: Is PHP easy to learn! ...
Example 2
Output
String:TutorialAndExample æøå???øåæøå New String: TutorialAndExample .???.