Home  >  Article  >  Backend Development  >  关于explode()的分隔符有关问题

关于explode()的分隔符有关问题

WBOY
WBOYOriginal
2016-06-13 12:53:50957browse

关于explode()的分隔符问题

<br />
    <div><br />
    <div><br />
    </div><br />
    </div><br />
    <div><br />
    <div>    <br />
    </div><br />
    </div>


我想通过进行分割。单个不可以~
这两个不在同行,其前方是缩进,请问如何解决

试过了
 $a=explode("\n\t",$a);   不行~~~

分隔符
------解决方案--------------------
$s=<<
html;
$arr=preg_split('/<\/div>\s+<\/div>/',$s);
print_r($arr);
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn