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
}
Related
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>';
}
}
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
}
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.
I have an object array (shown at the bottom) and can access the data by doing this:
echo $MyVariable->id;
echo $MyVariable->type;
and so on. However, I can't access the item [count] by doing this:
echo $MyVariable->id;
Anybody know why? Count seems to be used for something else, a count perhaps?
stdClass Object (
[id] => 573948779291487
[from] => stdClass Object (
[category] => Bar
[category_list] => Array (
[0] => stdClass Object (
[id] => 218693881483234
[name] => Pub
)
[1] => stdClass Object (
[id] => 164049010316507
[name] => Gastropub
) )
[name] => The Melbourne Arms
[id] => 533195070033525
)
[name] => The Melbourne Arms Gallery
[location] => The Melbourne Arms
[place] => stdClass Object (
[id] => 533195070033525
[name] => The Melbourne Arms
[location] => stdClass Object (
[street] => Main Street
[city] => Melbourne
[country] => United Kingdom
[zip] => YO42 4QJ
[latitude] => 53.8872441
[longitude] => -0.8554097
) )
[link] => http://www.facebook.com/album.php?fbid=573948779291487&id=533195070033525&aid=1073741825
[cover_photo] => 573948812624817
[count] => 28
[type] => normal
[created_time] => 2013-03-13T22:22:45+0000
[updated_time] => 2013-03-13T22:34:40+0000
[can_upload] =>
[likes] => stdClass Object (
[data] => Array (
[0] => stdClass Object (
[id] => 1361671776
[name] => Lesley Maiden
)
[1] => stdClass Object (
[id] => 518580863
[name] => Diane Maiden
)
[2] => stdClass Object (
[id] => 1254875611
[name] => Vanessa Wilson
)
[3] => stdClass Object (
[id] => 533195070033525
[name] => The Melbourne Arms
)
[4] => stdClass Object (
[id] => 100001664649752
[name] => Bowen Lee
) )
[paging] => stdClass Object (
[next] => https://graph.facebook.com/573948779291487/likes?limit=25&offset=25&__after_id=100001664649752
) ) ) 1
Try handling your data differently
$data = file_get_contents("https://graph.facebook.com/573948779291487");
$data = json_decode($data, true);
echo $data['count'];
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;
}