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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:53:50
Original
1038 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
Please tell me how to convert this kind of array
From 1970-01-01 08:00:00
0
0
0
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template