I have an object $user.
var_dump($user) will output this:
object(user)#12 (1) {
["mylog"]=> object(mylog)#13 (2) {
["userid"]=> string(1) "1"
["uname"]=> string(5) "admin"
}
}
What I want to access is the "userid" property. I succeeded with
foreach($user as $otherObject=>$property)
{
echo $property->userid;
}
My question is if I can do something like $user->OtherObjectPlaceholder->userid without needing to loop through all the properties?