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

WBOY
Release: 2016-06-13 12:53:50
Original
956 people have browsed it

关于explode()的分隔符问题

<br />
    <div><br />
    <div><br />
    </div><br />
    </div><br />
    <div><br />
    <div>    <br />
    </div><br />
    </div>
Copy after login


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

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


------解决方案--------------------
$s=<<
html;
$arr=preg_split('/<\/div>\s+<\/div>/',$s);
print_r($arr);
Copy after login

Related labels:
source:php.cn
Previous article: 明明下传了图片,判断图片图型时不通过 Next article: 给phpcms栏目图片增加下传按钮
Statement of this Website
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
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!