[__PHP_Incomplete_Class_Name]

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!

Moderator: General Moderators

Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

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.
Post Reply