Posted By

level09 on 08/18/09


Tagged


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

vali29
luman
umang_nine
ReeceMarsland


Parse JSON Data


 / Published in: PHP
 

  1. $json_string='{"id":1,"name":"foo","email":"[email protected]","interest":["wordpress","php"]} ';
  2. $obj=json_decode($json_string);
  3. echo $obj->name; //prints foo
  4. echo $obj->interest[1]; //prints php

Report this snippet  

You need to login to post a comment.