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 ) Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.