好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

php如何去掉指定字符串

php去掉指定字符串的方法:首先创建一个PHP示例文件;然后通过“substr_replace($a,"",$count,2);”方法去掉指定字符串;最后通过echo输出结果即可。

推荐:《PHP视频教程》

PHP在字符串中查找指定字符串并删除的代码

$a = "abcababa"; 
$count=strpos($a,"ab"); 
$str=substr_replace($a,"",$count,2);

输出结果:cababa

以上就是php如何去掉指定字符串的详细内容!

查看更多关于php如何去掉指定字符串的详细内容...

  阅读:53次