mb_split
ပုံမှန်အသုံးအနှုန်းတွေကိုအသုံးပြုပြီး Multibyte strings ကွဲခြင်း
function name: mb_split ()
သက်ဆိုင်သောဗားရှင်း: PHP 4> = 4.2.0, PHP 5, PHP 7
function ကိုဖော်ပြချက် - MB_SPLIT () function သည် strings သည် strings များကို ခွဲ. splited substring များဖြင့်ရေးထားသောခင်းပိတ်တစ်ခုသို့ထည့်သွင်းရန်စီစဉ်ထားသည်။
Syntax: MB_SPLIT (string $ ပုံစံ, string ကို $ string [int $ ကန့်သတ် = -1])
Parametermer
Reward Value: ကွဲပြားမှုအလွှာများရေးစပ်ထားသည့်ခင်းကျင်းမှုတစ်ခုသို့ပြန်လည်ရောက်ရှိလာပြီးကွဲသွားသည်ဆိုလျှင်မှားယွင်းစွာပြန်ပို့သည်။
ဥပမာ -
// 使用空格分割字符串$str = "Hello World"; $result = mb_split(" ", $str); print_r($result); // Output: Array ( [0] => Hello [1] => World ) // 使用正则表达式分割字符串$str = "Hello,World"; $result = mb_split("[,]", $str); print_r($result); // Output: Array ( [0] => Hello [1] => World ) // 限制返回的数组元素个数$str = "Hello World"; $result = mb_split(" ", $str, 1); print_r($result); // Output: Array ( [0] => Hello )
မှတ်စုများ