လက်ရှိတည်နေရာ: ပင်မစာမျက်နှာ> ဖန်ရှင်အမျိုးအစားများ> mb_decode_numericentity

mb_decode_numericentity

HTML Numeric Strings အပေါ်အခြေခံပြီးဇာတ်လမ်းများသို့ decode
အမည်:mb_decode_numericentity
အမျိုးအစား:Multi-byte string ကို
programming language:php
တစ်ကြောင်းဖြင့်အကျဉ်းချုပ်:HTML entity ကို၎င်း၏သက်ဆိုင်ရာဇာတ်ကောင်များသို့ပြောင်းပါ

function name: MB_Decode_NumeraleTity ()

သက်ဆိုင်သောဗားရှင်း: PHP 4.0.6 နှင့်အထက်

function ကိုဖော်ပြချက် - MB_Decode_numericality () function ကို HTML entity encoding ကို၎င်း၏သက်ဆိုင်ရာဇာတ်ကောင်များအဖြစ်ပြောင်းလဲရန်အသုံးပြုသည်။ ဒ decimal မသို့မဟုတ် hexadecimal ကိုယ်စားပြုမှုကို အသုံးပြု. Entity Encodings ကို decode လုပ်နိုင်သည်။

အသုံးပြုမှု:

 string mb_decode_numericentity ( string $str , array $convmap [, string $encoding = mb_internal_encoding() ] )

parameter သည်ဖော်ပြချက်:

  • $ str: decodded ခံရဖို့လိုအပ်တဲ့ string ကို။
  • $ Concmap: Entity encoding နှင့်ဇာတ်ကောင်များအကြားမြေပုံပြောဆိုမှုကိုသတ်မှတ်သည့်ဒြပ်စင်နှစ်ခုကိုဖော်ပြထားသည်။ ပထမ ဦး ဆုံးဒြပ်စင်သည် Entity Encoding ၏အစတန်ဖိုးနှင့်ဒုတိယဒြပ်စင်ဇာတ်ကောင်၏ယူနီကုဒ်တန်ဖိုးဖြစ်သည်။
  • $ encoding: optional parameter သည်အသုံးပြုမှု encoding ကိုသတ်မှတ်ခြင်း။ မသတ်မှတ်ပါကအတွင်းပိုင်းဇာတ်ကောင် encoding ကိုအသုံးပြုသည်။

Reward Value: decoded string, decoding ပျက်ကွက်လျှင်မှားယွင်းစွာပြန်ပြောင်း။

ဥပမာ -

 $str = "ABC"; $convmap = array(0x0, 0x10ffff, 0, 0xffff); $decodedStr = mb_decode_numericentity($str, $convmap, 'UTF-8'); echo $decodedStr; // 输出:ABC

အထက်ပါဥပမာတွင်ကျွန်ုပ်တို့သည် Entity encoding ကိုစာလုံးများအဖြစ်ပြောင်းလဲရန် MB_Decode_NumericaleTice () function ကိုသုံးသည်။ ကျွန်ုပ်တို့သည် "ABC" ကို function သို့ဖြတ်ပြီး entity encoding နှင့်ဇာတ်ကောင်များအကြားမြေပုံပြောဆိုမှုကိုသတ်မှတ်ရန် $convmap Array ကိုအသုံးပြုပါ။ နောက်ဆုံးအနေဖြင့်ကျွန်ုပ်တို့သည် decoded string ကိုမျက်နှာပြင်သို့ output လုပ်ပြီးရလဒ်သည် "ABC" ဖြစ်သည်။

သက်ဆိုင်သောဖင်ခှ်ရှင်းများ
လူကြိုက်များသော ဆောင်းပါးများ