$a = "abcababa";
$count=strpos($a,"ab");
$str=substr_replace($a,"",$count,2);
Output Result: cababa
Although the code is short, it is still a small algorithm!
http://www.bkjia.com/PHPjc/319506.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319506.htmlTechArticle$a = "abcababa"; $count=strpos($a,"ab"); $str=substr_replace ($a,"",$count,2); Output result: cababa Although the code is short, it is still a small algorithm! ...