Danny620 Posted April 30, 2012 Share Posted April 30, 2012 im trying to access code in array(1) { [0]=> object(stdClass)#4 (1) { ["error"]=> array(1) { [0]=> object(stdClass)#5 (2) { ["message"]=> string(33) "no results found (error code 458)" ["code"]=> string(3) "458" } } } } ive tryed echo $blog_posts[0]->error->code; but all i get is Notice: Trying to get property of non-object in /home/sites/inspiredanceacademy.com/public_html/sno-blog-test/lib/social_news_office.php on line 173 Link to comment https://forums.phpfreaks.com/topic/261859-php-json/ Share on other sites More sharing options...
ignace Posted April 30, 2012 Share Posted April 30, 2012 Try this: echo $blog_posts[0]->error[0]->code; Link to comment https://forums.phpfreaks.com/topic/261859-php-json/#findComment-1341774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.