PHP convert_cyr_string Function

What is convert_cyr_string Function?


In PHP, this function is used to convert from one cyrillic character set to another.



In the above syntax "string" specifies the given input to be split,"from" specifies what Cyrillic character-set to convert from "k - koi8-r", "w - windows-1251", "i - iso8859-5","a - x-cp866","d - x-cp866","m - x-mac-cyrillic", "to" specifies the character set to be converted to.

Example :

$str= "How are you!æøå";
echo convert_cyr_string($str,'w','a');
Result :

Hello world! æøå
Hello world! ¦è¥

In the above example the string is converted from "windows-1251" character set to "x-cp866".

PHP Topics

Ask Questions

Ask Question