Home > Backend Development > PHP Tutorial > php如何取取字符串

php如何取取字符串

WBOY
Release: 2016-06-20 12:36:35
Original
940 people have browsed it

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


取10  11  14这三个值,


回复讨论(解决方案)

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

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

Related labels:
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