stdClass Object foreach PHP - php

Been searching for a solution for my problem. Seams meny has the same q as me, but still haven't got a solution for my problem.
I have a stdClass Object that needs to be printed out in a foreach or somlike like that.
Here is a cut of the result i get with a "print_r($result)".
stdClass Object
(
[ServiceGroup] => Array
(
[0] => stdClass Object
(
[Service] => Array
(
[0] => stdClass Object
(
[_] => 3D-modulering
[count] => 71
)
[1] => stdClass Object
(
[_] => CAD
[count] => 81
)
[2] => stdClass Object
(
[_] => Databasutveckling
[count] => 118
)
[3] => stdClass Object
(
[_] => Datainmatare
[count] => 6
)
[4] => stdClass Object
(
[_] => Driftsteknik
[count] => 87
)
[5] => stdClass Object
(
[_] => IT-konsult
[count] => 39
)
[6] => stdClass Object
(
[_] => IT-tekniker
[count] => 223
)
[7] => stdClass Object
(
[_] => Mjuk- och hårdvarutestning
[count] => 150
)
[8] => stdClass Object
(
[_] => Nätverksteknik
[count] => 142
)
[9] => stdClass Object
(
[_] => Produkttestare
[count] => 171
)
[10] => stdClass Object
(
[_] => Programmerare
[count] => 146
)
[11] => stdClass Object
(
[_] => Projektledning
[count] => 156
)
[12] => stdClass Object
(
[_] => Serviceteknik
[count] => 157
)
[13] => stdClass Object
(
[_] => Support
[count] => 360
)
[14] => stdClass Object
(
[_] => Systemadministration
[count] => 145
)
[15] => stdClass Object
(
[_] => Systemutveckling
[count] => 110
)
[16] => stdClass Object
(
[_] => Webbdesign
[count] => 246
)
[17] => stdClass Object
(
[_] => Webbutveckling
[count] => 135
)
[18] => stdClass Object
(
[_] => webmaster
[count] => 103
)
)
[name] => Data/IT
)
[1] => stdClass Object
(
[Service] => Array
(
[0] => stdClass Object
(
[_] => Affärsanalys
[count] => 192
)
[1] => stdClass Object
(
[_] => Aktuarie
[count] => 20
)

I don't know exactly what you want, but can easily foreach through objects just like arrays. This example shows that.
foreach($result->ServiceGroup as $value){
foreach($value->Service as $obj){
echo $obj->_;
echo $obj->count;
}
echo $value->name;
}

Related

PHP parse soapClient response transfer to a table

I'm just on the hose and dont get on.
I am not a professional programmer but have so far with much reading and over numerous attempts everything so far created what I have undertaken, only with this I have probably found my masterpiece.
I have a response of a SOAP query and would like to display the values in a table for each powerUnitidentifier. What is the best way to do this?
(
[RawData] => stdClass Object
(
[from] => 2022-05-10T01:00:00+02:00
[to] => 2022-05-10T01:20:00+02:00
[dataRecords] => stdClass Object
(
[record] => Array
(
[0] => stdClass Object
(
[powerUnitIdentifier] => abc123
[time] => 2022-05-10T01:00:00+02:00
[fields] => stdClass Object
(
[field] => Array
(
[0] => stdClass Object
(
[identifier] => 100
[value] => 0
)
[1] => stdClass Object
(
[identifier] => 101
[value] => 3.27
)
[2] => stdClass Object
(
[identifier] => 102
[value] => 70.00
)
)
)
)
[1] => stdClass Object
(
[powerUnitIdentifier] => zyx321
[time] => 2022-05-10T01:00:00+02:00
[fields] => stdClass Object
(
[field] => Array
(
[0] => stdClass Object
(
[identifier] => 100
[value] => 0
)
[1] => stdClass Object
(
[identifier] => 101
[value] => 3.19
)
[2] => stdClass Object
(
[identifier] => 102
[value] => 70.00
)
)
)
)
[2] => stdClass Object
(
[powerUnitIdentifier] => abc123
[time] => 2022-05-10T01:10:00+02:00
[fields] => stdClass Object
(
[field] => Array
(
[0] => stdClass Object
(
[identifier] => 100
[value] => 0
)
[1] => stdClass Object
(
[identifier] => 101
[value] => 3.15
)
[2] => stdClass Object
(
[identifier] => 102
[value] => 70.00
)
)
)
)
[3] => stdClass Object
(
[powerUnitIdentifier] => zyx321
[time] => 2022-05-10T01:10:00+02:00
[fields] => stdClass Object
(
[field] => Array
(
[0] => stdClass Object
(
[identifier] => 100
[value] => 0
)
[1] => stdClass Object
(
[identifier] => 101
[value] => 3.09
)
[2] => stdClass Object
(
[identifier] => 102
[value] => 70.00
)
)
)
)
)
)
)
)```
You loop over the section of the data, starting the foreach loop at the right level of your data structure
foreach($theName->RawData->DataRecords->record as $obj) {
echo $obj->powerUnitIdentifier;
}
Or if you ment to process the sub array of that
foreach($theName->RawData->DataRecords->record as $obj) {
echo $obj->powerUnitIdentifier . '<br>';
foreach( $obj->fields as $field) {
echo $field->identifier . ',' . $field->value . '<br>';
}
}

StdClass Object to String , Iterating through the array

Hi I've asked this before but didn't get a correct answer. I am trying to get the Tracks to print from the stdObject. I've tried many possible answers but nothing worked apart from using:
var_dump("Track Title: " .
$response->Items->Item->Tracks->Disc->Track[0]->_);
But this only works if you know how many tracks there are for certain CD, I am calling 500 ASIN's at once. So basically I would like to parse the Tracks array into a String
[Items] => stdClass Object
(
[Request] => stdClass Object
(
[IsValid] => True
[ItemLookupRequest] => stdClass Object
(
[IdType] => ASIN
[ItemId] => B000002OGL
[ResponseGroup] => Tracks
[VariationPage] => All
)
)
[Item] => stdClass Object
(
[ASIN] => B000002OGL
[Tracks] => stdClass Object
(
[Disc] => stdClass Object
(
[Track] => Array
(
[0] => stdClass Object
(
[_] => Mustang Sally
[Number] => 1
)
[1] => stdClass Object
(
[_] => Take Me To The River
[Number] => 2
)
[2] => stdClass Object
(
[_] => Chain Of Fools
[Number] => 3
)
[3] => stdClass Object
(
[_] => The Dark End Of The Street
[Number] => 4
)
[4] => stdClass Object
(
[_] => Destination: Anywhere
[Number] => 5
)
[5] => stdClass Object
(
[_] => I Can't Stand The Rain
[Number] => 6
)
[6] => stdClass Object
(
[_] => Try A Little Tenderness
[Number] => 7
)
[7] => stdClass Object
(
[_] => Treat Me Right
[Number] => 8
)
[8] => stdClass Object
(
[_] => Do Right Woman Do Right Man
[Number] => 9
)
[9] => stdClass Object
(
[_] => Mr. Pitiful
[Number] => 10
)
[10] => stdClass Object
(
[_] => I Never Loved A Man
[Number] => 11
)
[11] => stdClass Object
(
[_] => In The Midnight Hour
[Number] => 12
)
[12] => stdClass Object
(
[_] => Bye Bye Baby
[Number] => 13
)
[13] => stdClass Object
(
[_] => Slip Away
[Number] => 14
)
)
[Number] => 1
)
)
)
)
)
you can do
foreach($response->Items->Item->Tracks->Disc->Track as $track){
echo "Track Title: ". $track->_;// or track title
}

Likes on Facebook Posts Pagination

I want to count the number of likes (and comments) on a Facebook post. But when there's more than 25 likes on a post, the results are paginated like that:
stdClass Object ( [data] => Array ( [0] => stdClass Object ( [id] => 802020049912534 [name] => Sagar Lama ) [1] => stdClass Object ( [id] => 590020061101130 [name] => Sheguey Squaad ) [2] => stdClass Object ( [id] => 696207733846316 [name] => Ossama Barcalona ) [3] => stdClass Object ( [id] => 1901218896769448 [name] => Gab Alviola ) [4] => stdClass Object ( [id] => 407069606150738 [name] => Thongloy Thichanon ) [5] => stdClass Object ( [id] => 947084195347741 [name] => Thomas Vujić ) [6] => stdClass Object ( [id] => 1614068872196230 [name] => เพื่อนà¸à¸¹à¹€à¸ˆà¹‡à¸š ชีวิตมึงจบ ) [7] => stdClass Object ( [id] => 1431328280529413 [name] => Ali-Bilal Dernek ) [8] => stdClass Object ( [id] => 855095404568872 [name] => Henry Feng ) [9] => stdClass Object ( [id] => 937460179628960 [name] => Rex Lu ) [10] => stdClass Object ( [id] => 1627484497506023 [name] => Röbërt GärÄïâ ) [11] => stdClass Object ( [id] => 971640236220159 [name] => Reyjoel Jimeno ) [12] => stdClass Object ( [id] => 1644471585776456 [name] => Og Catwalk ) [13] => stdClass Object ( [id] => 1652037021731712 [name] => Rafik Benchibane ) [14] => stdClass Object ( [id] => 499561140196412 [name] => Lizy Smith ) [15] => stdClass Object ( [id] => 10207169299621544 [name] => Ngai Lam ) [16] => stdClass Object ( [id] => 505507699598850 [name] => Ëlloï Gonzalez Sanchez ) [17] => stdClass Object ( [id] => 802078276575586 [name] => Armando Sanchez ) [18] => stdClass Object ( [id] => 10205977306769395 [name] => Fredy Santizo ) [19] => stdClass Object ( [id] => 811409772291367 [name] => Malik Davis ) [20] => stdClass Object ( [id] => 842376069172521 [name] => Isak Renee Martinez ) [21] => stdClass Object ( [id] => 915675738506394 [name] => Kimora Stephens Davis ) [22] => stdClass Object ( [id] => 916531748393520 [name] => Isabel Averill ) [23] => stdClass Object ( [id] => 941049645918044 [name] => Mathias Tenezaca Mendez ) [24] => stdClass Object ( [id] => 1452189318420627 [name] => Andrew Hernandez ) ) [paging] => stdClass Object ( [cursors] => stdClass Object ( [after] => MTQ1MjE4OTMxODQyMDYyNw== [before] => ODAyMDIwMDQ5OTEyNTM0 ) [next] => https://graph.facebook.com/v2.3/15087023444_10153196470723445/likes?access_token=xxxxxxxxxxxxxxxxxxx&limit=25&after=MTQ1MjE4OTMxODQyMDYyNw%3D%3D ) )
How can I count likes and comments on a given post without asking the Facebook API too much. I'm using the PHP SDK
You can either use paging to go through all Likes, or you can use the summary parameter to get a total count:
/post-id?fields=likes.summary(true)
Part of the response:
"summary": {
"total_count": 393,
"can_like": true,
"has_liked": false
}

Issue in looping stdClass Object in Php

I am facing strange issue in looping json object using php. Here is the format of my data
stdClass Object
(
[userform] => Array
(
[0] => stdClass Object
(
[id] => 69
[product] => testuser
)
[1] => stdClass Object
(
[id] => 70
[product] => testuser
)
[2] => stdClass Object
(
[id] => 71
[product] => testuser
)
[3] => stdClass Object
(
[id] => 72
[product] => testuser
)
[4] => stdClass Object
(
[id] => 73
[product] => testuser
)
[5] => stdClass Object
(
[id] => 74
[product] => testuser
)
[6] => stdClass Object
(
[id] => 75
[product] => testuser
)
[7] => stdClass Object
(
[id] => 76
[product] => testuser
)
[8] => stdClass Object
(
[id] => 77
[product] => testuser
)
[9] => stdClass Object
(
[id] => 78
[product] => testuser
)
[10] => stdClass Object
(
[id] => 79
[product] => testuser
)
[11] => stdClass Object
(
[id] => 80
[product] => testuser
)
[12] => stdClass Object
(
[id] => 81
[product] => testuser
)
[13] => stdClass Object
(
[id] => 82
[product] => testuser
)
[14] => stdClass Object
(
[id] => 83
[product] => testuser
)
[15] => stdClass Object
(
[id] => 84
[product] => testuser
)
[16] => stdClass Object
(
[id] => 85
[product] => testuser
)
[17] => stdClass Object
(
[id] => 86
[product] => testuser
)
[18] => stdClass Object
(
[id] => 87
[product] => testuser
)
[19] => stdClass Object
(
[id] => 88
[product] => testuser
)
[20] => stdClass Object
(
[id] => 89
[product] => testuser
)
)
)
But this loop throws following error.
Trying to get property of non-object in
Please let me know how to read the product property value from the above format
Thanks all
That foreach should be on $data->userform , not just $data
foreach($data->userform as $key=>$row){
if(isset($row->product)){
print_r($key);
print_r($row->product);
}else{
//product property is not set
}
}

Cannot get StdClass Array to output single values [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I can return nothing by trying to access the array like this:
$title = $response->Items->Item->ItemAttributes->Title;
$ISBN = $response->Items->Item->ItemAttributes->ISBN;
Any Help?
print_r($response) returns:
Array
(
[OperationRequest] => stdClass Object
(
[HTTPHeaders] => stdClass Object
(
[Header] => stdClass Object
(
[Name] => UserAgent
[Value] => PHP-SOAP/5.3.24
)
)
[RequestId] => 827356ca-4459-45b3-abed-f4abf17e50ee
[Arguments] => stdClass Object
(
[Argument] => stdClass Object
(
[Name] => Service
[Value] => AWSECommerceService
)
)
[RequestProcessingTime] => 0.186987
)
[Items] => stdClass Object
(
[Request] => stdClass Object
(
[IsValid] => True
[ItemSearchRequest] => stdClass Object
(
[Keywords] => 1933916958
[ResponseGroup] => Large
[SearchIndex] => Books
)
)
[TotalResults] => 1
[TotalPages] => 1
[MoreSearchResultsUrl] => http://www.amazon.com/gp/redirect.html?camp=2025&creative=386001&location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fsearch%3Fkeywords%3D1933916958%26url%3Dsearch-alias%253Dstripbooks&linkCode=sp1&tag=&SubscriptionId=
[Item] => stdClass Object
(
[ASIN] => 1933916958
[DetailPageURL] => http://www.amazon.com/I-Am-Stumped-Lisa-Rivard/dp/1933916958%3FSubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1933916958
[ItemLinks] => stdClass Object
(
[ItemLink] => Array
(
[0] => stdClass Object
(
[Description] => Technical Details
[URL] => http://www.amazon.com/I-Am-Stumped-Lisa-Rivard/dp/tech-data/1933916958%3FSubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D386001%26creativeASIN%3D1933916958
)
[1] => stdClass Object
(
[Description] => Add To Baby Registry
[URL] => http://www.amazon.com/gp/registry/baby/add-item.html%3Fasin.0%3D1933916958%26SubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D386001%26creativeASIN%3D1933916958
)
[2] => stdClass Object
(
[Description] => Add To Wedding Registry
[URL] => http://www.amazon.com/gp/registry/wedding/add-item.html%3Fasin.0%3D1933916958%26SubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D386001%26creativeASIN%3D1933916958
)
[3] => stdClass Object
(
[Description] => Add To Wishlist
[URL] => http://www.amazon.com/gp/registry/wishlist/add-item.html%3Fasin.0%3D1933916958%26SubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D386001%26creativeASIN%3D1933916958
)
[4] => stdClass Object
(
[Description] => Tell A Friend
[URL] => http://www.amazon.com/gp/pdp/taf/1933916958%3FSubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D386001%26creativeASIN%3D1933916958
)
[5] => stdClass Object
(
[Description] => All Customer Reviews
[URL] => http://www.amazon.com/review/product/1933916958%3FSubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D386001%26creativeASIN%3D1933916958
)
[6] => stdClass Object
(
[Description] => All Offers
[URL] => http://www.amazon.com/gp/offer-listing/1933916958%3FSubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D386001%26creativeASIN%3D1933916958
)
)
)
[SalesRank] => 2163913
[SmallImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L._SL75_.jpg
[Height] => stdClass Object
(
[_] => 75
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 75
[Units] => pixels
)
)
[MediumImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L._SL160_.jpg
[Height] => stdClass Object
(
[_] => 160
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 160
[Units] => pixels
)
)
[LargeImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L.jpg
[Height] => stdClass Object
(
[_] => 500
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 500
[Units] => pixels
)
)
[ImageSets] => stdClass Object
(
[ImageSet] => stdClass Object
(
[SwatchImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L._SL30_.jpg
[Height] => stdClass Object
(
[_] => 30
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 30
[Units] => pixels
)
)
[SmallImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L._SL75_.jpg
[Height] => stdClass Object
(
[_] => 75
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 75
[Units] => pixels
)
)
[ThumbnailImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L._SL75_.jpg
[Height] => stdClass Object
(
[_] => 75
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 75
[Units] => pixels
)
)
[TinyImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L._SL110_.jpg
[Height] => stdClass Object
(
[_] => 110
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 110
[Units] => pixels
)
)
[MediumImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L._SL160_.jpg
[Height] => stdClass Object
(
[_] => 160
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 160
[Units] => pixels
)
)
[LargeImage] => stdClass Object
(
[URL] => http://ecx.images-amazon.com/images/I/51vOOdcil6L.jpg
[Height] => stdClass Object
(
[_] => 500
[Units] => pixels
)
[Width] => stdClass Object
(
[_] => 500
[Units] => pixels
)
)
[Category] => primary
)
)
[ItemAttributes] => stdClass Object
(
[Author] => Lisa Rivard
[Binding] => Paperback
[Creator] => stdClass Object
(
[_] => Colleen Murray Fisher
[Role] => Illustrator
)
[EAN] => 9781933916958
[EANList] => stdClass Object
(
[EANListElement] => 9781933916958
)
[ISBN] => 1933916958
[ItemDimensions] => stdClass Object
(
[Height] => stdClass Object
(
[_] => 878
[Units] => hundredths-inches
)
[Length] => stdClass Object
(
[_] => 31
[Units] => hundredths-inches
)
[Weight] => stdClass Object
(
[_] => 30
[Units] => hundredths-pounds
)
[Width] => stdClass Object
(
[_] => 866
[Units] => hundredths-inches
)
)
[Label] => Ferne Press
[Languages] => stdClass Object
(
[Language] => Array
(
[0] => stdClass Object
(
[Name] => English
[Type] => Unknown
)
[1] => stdClass Object
(
[Name] => English
[Type] => Original Language
)
[2] => stdClass Object
(
[Name] => English
[Type] => Published
)
)
)
[ListPrice] => stdClass Object
(
[Amount] => 1095
[CurrencyCode] => USD
[FormattedPrice] => $10.95
)
[Manufacturer] => Ferne Press
[NumberOfItems] => 1
[NumberOfPages] => 32
[PackageDimensions] => stdClass Object
(
[Height] => stdClass Object
(
[_] => 30
[Units] => hundredths-inches
)
[Length] => stdClass Object
(
[_] => 890
[Units] => hundredths-inches
)
[Weight] => stdClass Object
(
[_] => 35
[Units] => hundredths-pounds
)
[Width] => stdClass Object
(
[_] => 880
[Units] => hundredths-inches
)
)
[ProductGroup] => Book
[ProductTypeName] => ABIS_BOOK
[PublicationDate] => 2012-02-15
[Publisher] => Ferne Press
[SKU] => 38594
[Studio] => Ferne Press
[Title] => I Am Stumped!
)
[OfferSummary] => stdClass Object
(
[LowestNewPrice] => stdClass Object
(
[Amount] => 652
[CurrencyCode] => USD
[FormattedPrice] => $6.52
)
[LowestUsedPrice] => stdClass Object
(
[Amount] => 1
[CurrencyCode] => USD
[FormattedPrice] => $0.01
)
[TotalNew] => 9
[TotalUsed] => 6
[TotalCollectible] => 0
[TotalRefurbished] => 0
)
[Offers] => stdClass Object
(
[TotalOffers] => 1
[TotalOfferPages] => 1
[MoreOffersUrl] => http://www.amazon.com/gp/offer-listing/1933916958%3FSubscriptionId%3D%26tag%3D%26linkCode%3Dsp1%26camp%3D2025%26creative%3D386001%26creativeASIN%3D1933916958
[Offer] => stdClass Object
(
[OfferAttributes] => stdClass Object
(
[Condition] => New
)
[OfferListing] => stdClass Object
(
[OfferListingId] => aHNL56yCKgoOwR9cqtskiy8iY%2B6ft1PDE%2FNUX7mlIfBkGcVKgCxSkvahafNTpHaN2YmBHIHfE2h4hONpYIwIED02MwIG2u4dSC4t%2BSaYVh8cRJvanet8VA%3D%3D
[Price] => stdClass Object
(
[Amount] => 986
[CurrencyCode] => USD
[FormattedPrice] => $9.86
)
[AmountSaved] => stdClass Object
(
[Amount] => 109
[CurrencyCode] => USD
[FormattedPrice] => $1.09
)
[PercentageSaved] => 10
[Availability] => Usually ships in 24 hours
[AvailabilityAttributes] => stdClass Object
(
[AvailabilityType] => now
[MinimumHours] => 0
[MaximumHours] => 0
)
[IsEligibleForSuperSaverShipping] => 1
)
)
)
[CustomerReviews] => stdClass Object
(
[IFrameURL] => http://www.amazon.com/reviews/iframe?akid=&alinkCode=sp1&asin=1933916958&atag=&exp=2013-08-08T23%3A01%3A28Z&v=2&sig=ooHZSabKAym%2BTAQVErbn36Ng95H65hAhTUgn9REzmE8%3D
[HasReviews] => 1
)
[EditorialReviews] => stdClass Object
(
[EditorialReview] => stdClass Object
(
[Source] => Product Description
[Content] => All Aiden wants to do is play with his friends, but his name starts with the wrong letter, he's wearing the wrong color, and is eating the wrong food. He's so confused that he's stumped! Lisa Rivard's I Am Stumped! teaches kids how to get along and that three is not a crowd.
[IsLinkSuppressed] =>
)
)
[BrowseNodes] => stdClass Object
(
[BrowseNode] => stdClass Object
(
[BrowseNodeId] => 3153
[Name] => Friendship
[Ancestors] => stdClass Object
(
[BrowseNode] => stdClass Object
(
[BrowseNodeId] => 7009087011
[Name] => Friendship, Social Skills & School Life
[Ancestors] => stdClass Object
(
[BrowseNode] => stdClass Object
(
[BrowseNodeId] => 1084192
[Name] => Growing Up & Facts of Life
[Ancestors] => stdClass Object
(
[BrowseNode] => stdClass Object
(
[BrowseNodeId] => 4
[Name] => Children's Books
[Ancestors] => stdClass Object
(
[BrowseNode] => stdClass Object
(
[BrowseNodeId] => 1000
[Name] => Subjects
[IsCategoryRoot] => 1
[Ancestors] => stdClass Object
(
[BrowseNode] => stdClass Object
(
[BrowseNodeId] => 283155
[Name] => Books
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
$title = $response['Items']->Item->ItemAttributes->Title;
$ISBN = $response['Items']->Item->ItemAttributes->ISBN;
Response is an Array not an object in the case above.

Categories