Reputation: 12512
If I have an array in the following format:
Array ( [0] => stdClass Object ( [id] => 1 [c] => 1 [q] => value 1. ) [1] => stdClass Object ( [id] => 2 [c] => 1 [q] => value 2...
and I need to get
value 1
Shouldn't I be able to get it by doing something like?
$myArray[0]['q']
FOr some reason I'm not getting anything...
Upvotes: 0
Views: 41
Reputation: 5239
The element is inside an object
, you need to do,
echo $myArray[0]->q;
Upvotes: 2