How to transfer json data to html with php?

Posted by cj333 on Stack Overflow See other posts from Stack Overflow or by cj333
Published on 2011-01-08T14:49:18Z Indexed on 2011/01/08 14:53 UTC
Read the original article Hit count: 174

Filed under:
|

How to transfer json data to html with php?

$url="http://api.nytimes.com/svc/search/v1/article?format=json&query=usa&rank=newest&api-key=mykey"

when I type the url in browser, it return {"offset" : "0" , "results" : [{"body" : "A guide to cultural and recreational goings-on in and around the Hudson Valley. ...}]} how to put the json body data into html? I mean like this echo '<div class="body"></div>';

© Stack Overflow or respective owner

Related posts about php

Related posts about JSON