Home > Backend Development > PHP Tutorial > PHP数据格式问题

PHP数据格式问题

WBOY
Release: 2016-06-06 20:19:40
Original
1127 people have browsed it

PHP数据格式问题

我想把data里的数据格式变成list的 怎么办?

回复内容:

PHP数据格式问题

我想把data里的数据格式变成list的 怎么办?

data中储存的是json格式的字符串 你用json_decode($data,true)就可以得到数组格式了

json_decode(data)

<code>json_encode(json_decode(list,true))</code>
Copy after login

json_decode 应该是data 的数据多了次 json_encode 导致的

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