X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP convert_cyr_string() Function

PHP String Reference PHP String Reference

Example

Convert a string from one character-set to another:

<?php
$str = "Hello world! זרו";
echo $str . "<br>";
echo convert_cyr_string($str,'w','a');
?>

Run example »

Definition and Usage

The convert_cyr_string() function converts a string from one Cyrillic character-set to another.

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

Note: This function is binary-safe.


Syntax

convert_cyr_string(string,from,to)

Parameter Description
string Required. The string to convert
from Required. A character that specifies what Cyrillic character-set to convert from
to Required. A character that specifies what Cyrillic character-set to convert to

Technical Details

Return Value: Returns the converted string
PHP Version: 4+


PHP String Reference PHP String Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook