preg_match
ပုံမှန်စကားရပ်ကိုက်ညီလုပ်ဆောင်ပါ
preg_match()
function ကို string ကိုအတွက်တွေ့ရှိရှိမရှိပြန်ပို့။
"W3School" ကို အသုံးပြု. "W3School" ကို အသုံးပြု. "W3School" နှင့်အများအားဖြင့်အာရုံမခံစားနိုင်ပါ။
<? PHP $ str = "W3School သို့သွားပါ" ; $ pattern = "/ w3school / i" ; Echo Preg_match ( $ ပုံစံ , $ str ) ; >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ
Input String ရှိပွဲစဉ်၏တည်နေရာကိုရှာဖွေရန် Preg_Foffset_Capture ကိုသုံးပါ။
<? PHP $ str = "w3school မှကြိုဆိုပါ၏ " $ pattern = "/ w3school / i" ; Preg_match ( $ ပုံစံ , $ str str , $ ကိုက်ညီမှု , preg_offset_Capture ) ; Print_R ( $ ကိုက်ညီ ) ; >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ