str_pad
အရှည်အတွက် string ကိုဖြည့်ရန်အခြား string ကိုသုံးပါ
str_pad()
function သည် string ကိုအလျားအသစ်ဖြင့်ဖြည့်ပေးသည်။
string ၏ညာဘက်အခြမ်းကိုစာလုံးရေ 30 အထိဖြည့်ပါ။
<? PHP $ str = "Hello World" ; ECHO strust_pad ( $ str , 30 , "။ " ) ; >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ
ကြိုး၏ဘယ်ဘက်ခြမ်းကိုဖြည့်ပါ။
<? PHP $ str = "Hello World" ; ECHO strust_pad ( $ str , 30 , 30, "။ " , strow_pad_left ) ; >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ
string ကိုနှစ်ဖက်စလုံးကိုဖြည့်ပါ။
<? PHP $ str = "Hello World" ; echo strow_pad ( $ str , 30 , 30 "။ :" strow_pad_both ) ; >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ
strow_pad ( string , အရှည် , pad_string , pad_type )
တေးရေး | ဖေါ်ပြ |
---|---|
ကြိုး | လိုအပ်ပါတယ် ဖြည့်ဖို့ string ကိုဖေါ်ပြသည်။ |
အရှည် | လိုအပ်ပါတယ် အသစ်သော string ကိုအရှည်ကိုဖေါ်ပြသည်။ အကယ်. တန်ဖိုးသည် string ၏မူလအရှည်ထက်နည်းသည်ဆိုပါကဘာမှမလုပ်ပါ။ |
pad_string | optional ကို။ padding များအတွက် string ကိုဖေါ်ပြသည်။ ပုံသေသည်အလွတ်ဖြစ်သည်။ |
pad_type |
optional ကို။ ဖြည့်ရန် string ကို၏အခြမ်းကိုဖေါ်ပြသည်။ ဖြစ်နိုင်သောတန်ဖိုးများ:
|