MoFish Posted October 11, 2014 Share Posted October 11, 2014 Hi, I'm getting the following response using: $json_object = json_decode($unparsed_json, true); array(1) { ["google.com"]=> array(2) { ["status"]=> string(16) "regthroughothers" ["classkey"]=> string(6) "domcno" } } How do I echo the attribute of the ['status']? I have tried using: echo $json_object->['status']; Thanks, MoFish Link to comment https://forums.phpfreaks.com/topic/291571-json-response-how-to-read-value/ Share on other sites More sharing options...
Ch0cu3r Posted October 11, 2014 Share Posted October 11, 2014 Use $json_object['google.com']['status']; instead $json_object is a multidimensional array not an object. Link to comment https://forums.phpfreaks.com/topic/291571-json-response-how-to-read-value/#findComment-1493318 Share on other sites More sharing options...
MoFish Posted October 12, 2014 Author Share Posted October 12, 2014 Thank you. Link to comment https://forums.phpfreaks.com/topic/291571-json-response-how-to-read-value/#findComment-1493388 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.