Hi,
I have a class method that returns an array of data. However, I don't know how to pull the data from the class when I am working with my instance. For example.
$thing = new Gadget($id);
$thing->GetTeams(); // This method returns an array of teams and the properties of the teams (mascot, home town, coach...etc).
How do I get the, for example, mascot of team X?
echo $thing->GetTeams()[0]['mascot'] doesn't work, but if i print_r, I can see the info is there. How do I get to it without assigning GetTeams() to a temporary variable ($temp[0]['mascot'] works just fine)?
Thanks!