Delete (function) between two strings

From , 3 Years ago, written in PHP, viewed 231 times.
URL https://pastebin.vip/view/86c4ad52
  1. function delStr($start, $end, $orgenStr)  
  2. {  
  3.   //删除$start/$end之间字符
  4.    //读取要删除字符位置的前一部分字符串,并赋值给$temp  
  5.    //strpos读取字符第一次出现的位置  
  6.    //substr读取指定开始与结束位置的子字符串  
  7.  
  8.    $temp=$orgenStr;  
  9.    while(strpos($temp, $start) && strpos($temp, $end)){  
  10.     $temp=substr($temp, 0, strpos($temp, $start)).substr($temp,strpos($temp, $end)+strlen($end));;  
  11.    }  
  12.    return $temp;  
  13. }

Reply to "Delete (function) between two strings"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website