Home > Backend Development > PHP Tutorial > 正则表达式 - php正则提取字符并转化成数组形式

正则表达式 - php正则提取字符并转化成数组形式

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:44:17
Original
1718 people have browsed it

{"div_class":"deal","pinpai_link":""},{"div_class":"deal","pinpai_link":""}
需要把{}形式的匹配成数组。

回复内容:

{"div_class":"deal","pinpai_link":""},{"div_class":"deal","pinpai_link":""}
需要把{}形式的匹配成数组。

<code>$text = '{"div_class":"deal","pinpai_link":""},{"div_class":"deal","pinpai_link":""}';
print_r( json_decode ( "[$text]", true ) );
</code>
Copy after login
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template