Newbie: pulling data from array of objects
Posted: Mon Mar 16, 2009 6:06 pm
I'm a bit of a Newbie but I need to work something out that I'm struggling with. I've tried to RTFM but ain't getting any where.
I'm trying to access a data feed from CJ.
The call goes ok but the results are giving me grief because it appears to be an array of objects.
I need to be able to pull the results from each of the objects.
If I do a print_r($results); the output looks something like this:
What do I need to do to be able to access each of the object variables?
Dry_Aquaman
I'm trying to access a data feed from CJ.
The call goes ok but the results are giving me grief because it appears to be an array of objects.
I need to be able to pull the results from each of the objects.
If I do a print_r($results); the output looks something like this:
Code: Select all
stdClass Object ( [out] => stdClass Object ( [count] => 2 [offset] => 0 [products] => stdClass Object ( [Product] => Array ( [0] => stdClass Object ( [adId] => 10356001 [advertiserId] => 1055136 [advertiserName] => 4inkjets! [buyUrl] => http://www.kqzyfj.com/click-2351998-103 ... =XPI-4080C [catalogId] => cjo:628 [currency] => USD [description] => Save money with the Inktec Color Ink Refill Kit for Xerox 8R7880 Ink-jet Cartridges. [imageUrl] => http://www.ldproducts.com/varien/media/ ... -4080C.jpg [inStock] => [isbn] => [manufacturerName] => Xerox [manufacturerSku] => 8R7880 [name] => Inktec Color Ink Refill Kit for Xerox 8R7880 Ink-jet Cartridges [price] => 18.99 [retailPrice] => 0 [salePrice] => 14.99 [sku] => XPI-4080C [upc] => )Dry_Aquaman