Get string between - Find all occurrences PHP

前端 未结 6 1433
抹茶落季
抹茶落季 2020-12-08 16:37

I found this function which finds data between two strings of text, html or whatever.

How can it be changed so it will find all occurrences? Every data between every

6条回答
  •  时光取名叫无心
    2020-12-08 17:01

    I love to use explode to get string between two string. this function also works for multiple occurrences.

    function GetIn($str,$start,$end){
        $p1 = explode($start,$str);
        for($i=1;$i

提交回复
热议问题