PHP convert_cyr_string() Function
You are Here:
PHP convert_cyr_string()
The convert_cyr_string()
function converts from one Cyrillic character set to another.
Example
PHP Compiler
<?php
$str = "Wikimass æøå??";
echo $str . "<br>";
echo convert_cyr_string($str, 'w', 'k');
?>
Output
Wikimass æøå??
Wikimass �.��??
Syntax
convert_cyr_string(str, from, to)
Parameter Values
Value | Type | Explanation |
---|---|---|
str | Required | Specifies the string to be converted. |
from | Required | Specifies the source Cyrillic character set, as a single character. |
to | Required | Specifies the target Cyrillic character set, as a single character. |
Return Value
Value | Explanation |
---|---|
String | Returns the converted string. |
List of Supported Cyrillic Character-sets
The following table provides list of supported Cyrillic character-sets:
Symbol | Character Set |
---|---|
k | koi8-r |
w | windows-1251 |
i | iso8859-5 |
a | x-cp866 |
d | x-cp866 |
m | x-mac-cyrillic |
Reminder
Hi Developers, we almost covered 90% of String functions and Interview Question on PHP with examples for quick and easy learning.
We are working to cover every Single Concept in PHP.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.