復制代碼 代碼如下:
<?
// ### 切分字符串 ####
function jb51netcut($start,$end,$file){
$content=explode($start,$file);
$content=explode($end,$content[1]);
return $content[0];
}
?>
參數描述
separator必需。規定在哪里分割字符串。
string必需。要分割的字符串。
limit可選。規定所返回的數組元素的最大數目。
復制代碼 代碼如下:
<?php
$str = "Hello world. It's a beautiful day.";
print_r (explode(" ",$str));
?>
新聞熱點
疑難解答