您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php截取函数intercept_str详解

2025/8/9 6:10:48发布31次查看
本文主要和大家分享php截取函数intercept_str详解,主要以一段代码和大家分享,希望能帮助到大家。
下面粘贴上此函数的实现
function intercept_str($str,$start,$end,$option = 1){ $strarr=explode($start,$str); $tem=$strarr[1]; if(empty($end)){ return $tem; }else{ $strarr=explode($end,$tem); if($option==1){ return $strarr[0]; } if($option==2){ return $start.$strarr[0]; } if($option==3){ return $strarr[0].$end; }else{ return $start.$strarr[0].$end; } } }
以上就是php截取函数intercept_str详解的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product