新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
解讀PHP函數(shù)explode()的具體使用方法
目前PHP語言算是相當火的一門高級語言。我們可以用它來創(chuàng)建一個高性能的網(wǎng)站等。今天我們?yōu)榇蠹規(guī)淼氖怯嘘PPHP函數(shù)explode()的具體用法,希望能對又需要的朋友有所幫助。

#t#PHP函數(shù)explode()把字符串分割為數(shù)組
explode(separator,string,limit)
separator 必需。規(guī)定在哪里分割字符串。
string 必需。要分割的字符串。
limit 可選。規(guī)定所返回的數(shù)組元素的最大數(shù)目。
PHP函數(shù)explode()例子
- $str = "Hello world. It's a beautiful day.";
- print_r (explode(" ",$str));
- ?>
輸出:
- Array
- (
- [0] => Hello
- [1] => world.
- [2] => It's
- [3] => a
- [4] => beautiful
- [5] => day.
- )
以上代碼示例就是PHP函數(shù)explode()的具體使用。
網(wǎng)站標題:解讀PHP函數(shù)explode()的具體使用方法
本文鏈接:http://m.5511xx.com/article/cdppdci.html


咨詢
建站咨詢
