Home >Backend Development >PHP Tutorial >How to use regular expressions in PHP to get the paths of all images_PHP Tutorial

How to use regular expressions in PHP to get the paths of all images_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 14:55:37709browse

Question:

As shown below, two questions:
1. How to write a php statement that uses regular expressions to obtain all image addresses?
2. How to save the retrieved multiple addresses into the database one by one?

1、什么是在线编辑器 2、fckeditor配置 3、fckeditor的应用 4、fckeditor结合数据库应用

Answer:

$str ='

1、什么是在线编辑器 2、fckeditor配置 3、fckeditor的应用 4、fckeditor结合数据库应用

';
preg_match_all("/]*>/i", $str, $match);
print_r($match);
$str ='

1. What is an online editor? 2. fckeditor configuration 3. fckeditor application 4 , fckeditor combined with database application

'; preg_match_all("/]*>/i", $str, $ match); print_r($match);

http://www.bkjia.com/PHPjc/364375.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364375.htmlTechArticle
Question: As shown below, two questions: 1. How to write a php statement to obtain all image addresses using regular expressions? 2. How to save the retrieved multiple addresses into the database one by one? pim...
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