search

Home  >  Q&A  >  body text

How to get the specified content of json?

json content is as follows:

[{"id": "520","title": "我爱你","url":"https://www.php.cn",},{"id":"1314","title":"一生一世","url":"https://www.html.cn"},{"id":"2000","title":"py","url":"https://www.py.cn"}]

I want to get the id content corresponding to the json content through the url id content $id = $_GET["id"]

For example, the url is?id= 520, just get the title and url content of id:520 in json

How to do this? I hope the big guys can teach me

阳光阳光967 days ago920

reply all(1)I'll reply

  • autoload

    autoload2022-03-26 10:16:48

    json_decode decoding acquisition

    reply
    0
  • Cancelreply