PHP convert_cyr_string() Function

PHP convert_cyr_string() function is used to converts a string from one Cyrillic character set to another.

Syntax

string convert_cyr_string(str,from,to);

convert_cyr_string() Function Parameter

ParameterDescription
str :Required parameter. The string to be converted.
from :Required parameter. The source Cyrillic character set, as a single character.
to :Required parameter. The target Cyrillic character set, as a single character.

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

convert_cyr_string() Function Return Value

Return Value :Returns the converted string.

convert_cyr_string() Function Example

<?php
echo convert_cyr_string("Converts a string from one Cyrillic character set to another   ,'t','p'");
?>