I currently have an Object which holds a series of Arrays, when I do print_r it does show the arrays however, when I want to get these values out I seem to be getting an error.
print_r($Obj->Example);
Returns:
Object => Example ( 'Username' => 'Example' )
My code to query through the Object is:
foreach($Obj as $single):
echo $Example['Username'];
endif;
Is it possible to query through like this because it isn't working and I get an error saying that:
$Obj is not defined as an Array
So how can I access the Example array and echo all the Usernames ?
$Exampale->usernameand usevar_dump()function for dumping variable. don't useprint_rprint_r()print_r()?print_r()returns me what I am looking for and it is an array but when Iforeachthe Object to get to theArrayit gives me an error. How do Iforeachthe Object?