- explode() - 將字串分割(以陣列儲存)
explode(separator,string,limit) 範例: <? $student="kevin susan james"; $stuednt_array=explode(" ",$student); foreach($stuednt_array as $index => $value) echo "student $index is: $value\n"; ?> 輸出: student 0 is: kevin student 1 is: susan student 2 is: james
separator | 分隔字元 |
string | 要處理的字串 |
limit | 可選。規定所返回的數組元素的最大數目 |
Please follow and like us:
最近迴響