PHP convert_cyr_string() လုပ်ဆောင်ချက်
ဥပမာ
စာလုံးအတွဲတစ်ခုမှ အခြားစာကြောင်းတစ်ခုသို့ ပြောင်းပါ-
<?php
$str = "Hello world! æøå";
echo $str . "<br>";
echo convert_cyr_string($str,'w','a');
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
convert_cyr_string() လုပ်ဆောင်ချက်သည် လိုင်းတစ်ခုကို Cyrillic စာလုံးသတ်မှတ်မှုမှ နောက်တစ်ခုသို့ ပြောင်းပေးသည်။
ပံ့ပိုးပေးထားသည့် Cyrillic ဇာတ်ကောင်အတွဲများမှာ-
- k - koi8-r
- w - windows-1251
- i - iso8859-5
- a - x-cp866
- d - x-cp866
- m - x-mac-cyrillic
မှတ်ချက်- ဤလုပ်ဆောင်ချက်သည် binary-safe ဖြစ်သည်။
အထားအသို
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 |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ပြောင်းထားသော စာကြောင်းကို ပြန်ပေးသည်။ |
---|---|
PHP ဗားရှင်း- | 4+ |
❮ PHP String အကိုးအကား