purencool Posted February 1, 2011 Share Posted February 1, 2011 I have been trying to access an stdClass I can't. This stdClass gets returned from a method in a class . below the query is right all I want to do is put admi into a session var but I can't seem to access the obj. I can print_r and it displays. I am sure that it is easy. being new to PDO I am getting lost at times. Any help would be greatfully recieved stdClass Object ( [Admin_Level] => admi ) Link to comment https://forums.phpfreaks.com/topic/226307-stdclass-object/ Share on other sites More sharing options...
purencool Posted February 1, 2011 Author Share Posted February 1, 2011 can someone tell is this an object or array? Link to comment https://forums.phpfreaks.com/topic/226307-stdclass-object/#findComment-1168176 Share on other sites More sharing options...
trq Posted February 1, 2011 Share Posted February 1, 2011 It is an object. If that object was stored in a variable called $obj, to access the string 'admi' you would use $obj->Admin_Level Link to comment https://forums.phpfreaks.com/topic/226307-stdclass-object/#findComment-1168204 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.