Code Snippet
Parse JSON
<?php
$json ='{"id":1,"name":"foo","interest":["wordpress","php"]} ';
$obj=json_decode($json);
echo $obj->interest[1]; //prints php
?><?php
$json ='{"id":1,"name":"foo","interest":["wordpress","php"]} ';
$obj=json_decode($json);
echo $obj->interest[1]; //prints php
?>
Nice code……..
It works. I’ve used it for search suggestion using Yahoo UI.
So simple. Exactly the little snippet I needed.
Perfect. Thanks.
DigWP
A book and blog co-authored by Jeff Starr and myself about the World's most popular publishing platform.
Quotes on Design
Design, like Art, can be an elusive word to define and an awfully fun thing to have opinions about.
HTML-Ipsum
One-click copy to clipboard access to Lorem Ipsum text that comes wrapped in a variety of HTML.
Bookshelf
Hey Chris, what books do you recommend? These, young fertile mind, these.