maheswaran Posted April 14, 2011 Share Posted April 14, 2011 Hi guys, I have below values in array stdClass Object ( [Category] => stdClass Object ( [ChildCategoryDescription] => 50s / 60s ERA [ChildCategoryID] => 87 [GrandchildCategoryDescription] => - [GrandchildCategoryID] => 25 [ParentCategoryDescription] => CONCERTS [ParentCategoryID] => 2 ) [Description] => Tony Bennett [iD] => 1073 [HomeVenueID] => 0 ) When am calling Desciption object by $resultsObj->Description then i got the result " Tony Bennett" but i do not know to get the value GrandchildCategoryID . Just i tried this echo $resultsObj->$resultsObj->ParentCategoryID and i got below error. Catchable fatal error: Object of class stdClass could not be converted to string in D:\Program Files\xampp\htdocs\t1\genericLib.php on line 255. How i can get this value... Link to comment https://forums.phpfreaks.com/topic/233728-object-of-class-stdclass-could-not-be-converted/ Share on other sites More sharing options...
Muddy_Funster Posted April 14, 2011 Share Posted April 14, 2011 have you tried using print_r() instead of echo? Best I can offer, I can't actualy work out what you are doing here Link to comment https://forums.phpfreaks.com/topic/233728-object-of-class-stdclass-could-not-be-converted/#findComment-1201607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.