PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
This is an object you are dealing with, not an array. Although it appears to be an array, its not. You cannot access the data in that structure using $arrayName['key']. You really should read up on some PHP docs to get up to speed.
It would appear all the properties of the object are dynamically generated, i.e. public but not apart of the class definition. Therefore $foo->cart['bar'] should technically be possible provided the "cart" property has been set by the object.