How to read json in php with example?

JSON -  Javascript Object Notation.It's a lightweight data interchange format  and also a subset of javascript programming language.Json is language independent.It is has hierarchical values as well.Easy to read and write.

Example:

 $json_data = '{"a":"code","b":"expertz","c":"json","d":"read","e":"php"}';
 $encoded_json = json_decode($json_data);
 print_r($encoded_json);

OUTPUT

 

Category: 

Comments

Shelia (not verified)
Oh my goodness! Awesome article dude! Many thanks, However <br><br> I am experiencing troubles with your RSS.<br><br> I don't understand why I am unable to join it. Is there anybody else having the same <br><br> RSS issues? Anybody who knows the answer will you kindly respond?<br><br> Thanx!!