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

PHP数据格式问题

WBOY
WBOYOriginal
2016-06-06 20:19:401116browse

PHP数据格式问题

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

回复内容:

PHP数据格式问题

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

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

json_decode(data)

<code>json_encode(json_decode(list,true))</code>

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

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