Home > Backend Development > PHP Tutorial > How to get the value in json in php?

How to get the value in json in php?

WBOY
Release: 2016-08-04 09:20:13
Original
3330 people have browsed it

{"result":{"songs":[{"id":33916732,"name":"Farewell, love}]},{"songs":[{"id":3654522,"name":"年wheel}]}...

There is such a set of cyclic arrays. How can I get the id value of songs using php? Can you please help me.

Reply content:

{"result":{"songs":[{"id":33916732,"name":"Farewell, love}]},{"songs":[{"id":3654522,"name":"年wheel}]}...

There is such a set of cyclic arrays. How can I get the id value of songs using php? Can you please help me.

Use json_decode() to parse json data, and then use foreach() to loop the output

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