Home  >  Article  >  Backend Development  >  php如何取取字符串

php如何取取字符串

WBOY
WBOYOriginal
2016-06-20 12:36:35898browse

php如何取 list-10-11-14.html 取字符串


取10  11  14这三个值,


回复讨论(解决方案)

preg_match_all('/\d+/', 'list-10-11-14.html', $m);print_r($m[0]);

除了楼上的正则,还可以用explode

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