i want to get the val开发者_开发问答ues of different fields in Json by using php
json_decode($string) will return an object from which you can get the values you assigned.
For example:
$myObject = new MyObject();
$myObject -> att1 = 5;
$string = json_encode($myObject);
//here's how you get the value:
$myJsonDecodedObject = json_decode($string);
$value = $myJsonDecodedObject -> att1;
精彩评论