Home > Backend Development > PHP Tutorial > php preg_match_all matches pictures in articles

php preg_match_all matches pictures in articles

WBOY
Release: 2016-07-25 08:54:26
Original
927 people have browsed it
  1. $con = file_get_contents("http://bbs.it-home.org/news/jb-1.html");
  2. $pattern="//";
  3. preg_match_all($pattern,$con,$match);
  4. print_r($match);
  5. ?>
复制代码

输出结果: Array ( [0] => Array ( [0] => php preg_match_all matches pictures in articles [1] => php preg_match_all matches pictures in articles [2] => php preg_match_all matches pictures in articles ) [1] => Array ( [0] => http://bbs.it-home.org/usr/themes/dddefault/images/logo.png [1] => http://bbs.it-home.org/usr/uploads/2012/09/531656480.jpg [2] => http://bbs.it-home.org/usr/uploads/2012/09/2647136297.jpg ) )



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