Home > Backend Development > PHP Tutorial > 获取文本中某一段内容,并且此内容有很多条

获取文本中某一段内容,并且此内容有很多条

WBOY
Release: 2016-06-23 14:38:22
Original
899 people have browsed it

我想从下面一段文字中获取几个值
文本: 

a..............b..............c..............d...............e
我想按照与这个中间的a,b,c,d,e这几个值,并组成数组...
其中......的长度以及内容是变化的...
我知道网上有获取中间值的函数,但是只能获取第一个,而不能获取后面的...

回复讨论(解决方案)

preg_match_all('#

(.+)#sU',$s,$m);
print_r($m[1]);

谢谢...
我换咯另外一种办法...

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template