![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
convert_cyr_string() function in PHP
The convert_cyr_string() function is used to convert 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
Syntax
convert_cyr_string(str, from, to)
Parameters
str − String to format
from − The source Cyrillic character set, as a single character.
to − The destination Cyrillic character set, as a single character.
Return
The convert_cyr_string() function returns the converted string.
The following is an example −
Example
<?php $s = "Welcome to the website! æøå"; echo $s . "<br>"; echo convert_cyr_string($str,'w','a'); ?>
The following is the output −
Output
Welcome to the website! æøå Welcome to the website! ¦è¥
Advertisements