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:

  1. k – koi8-r
  2. w – windows-1251
  3. i – iso8859-5
  4. a – x-cp866
  5. d – x-cp866
  6. m – x-mac-cyrillic

Syntax

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

Example 2

Output