convert_cyr_string() फ़ंक्शन
PHP में convert_cyr_string() फ़ंक्शन एक साइरिलिक कैरेक्टर सेट को दूसरे में बदलने के लिए उपयोग किया जाता है।
समर्थित साइरिलिक कैरेक्टर सेट्स:
- k - koi8-r
- w - windows-1251
- i - iso8859-5
- a - x-cp866
- d - x-cp866
- m - x-mac-cyrillic
सिंटैक्स
convert_cyr_string(string $string, string $from, string $to): string
पैरामीटर्स
- string - फॉर्मेट की जाने वाली स्ट्रिंग
- from - स्रोत साइरिलिक कैरेक्टर सेट (सिंगल कैरेक्टर)
- to - गंतव्य साइरिलिक कैरेक्टर सेट (सिंगल कैरेक्टर)
रिटर्न वैल्यू
convert_cyr_string() फ़ंक्शन कन्वर्टेड स्ट्रिंग रिटर्न करता है।
उदाहरण
<?php $s = "Welcome to the website! æøå"; echo $s . "<br>"; echo convert_cyr_string($s, 'w', 'a'); ?>
आउटपुट
Welcome to the website! æøå Welcome to the website! ¦è¥