Hey,
I have an object
$itemObj["obj"]
. When I print this object this is the result I get.
Product Object ( [_table:private] => module_ecommerce_products [_fieldtable:private] => module_ecommerce_products_fieldvalues [_pricetable:private] => module_ecommerce_products_prices [_imagetable:private] => module_ecommerce_products_images [_filetable:private] => module_ecommerce_products_files [_prefix:private] => product [id] => 45 [name] => Men's Beardo XLarge [model] => [altname] => [specification] => 0 [shortdesc] => [desc] => [image] => 0 [quantity] => 0 [category] => 17 [date] => 1205083220 [online] => 0 [featured] => 0 [variation] => 37 [order] => 5 )
I have tried to access the methods by using $itemObj->module_ecommerce_products; but the it prints nothing.
Thanks.
First, objects reference properties via -> . For example $itemObj->obj.
Second, you can't access private variables.
If you must access it, create an accessor function like getModuleEcommerceProducts which returns the value.