Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:15:59+00:00 2026-05-26T23:15:59+00:00

Here I have an output from a website using Soap stdClass Object ( [page]

  • 0

Here I have an output from a website using Soap

stdClass Object 
( 
  [page] => 0 
  [items] => 3 
  [total] => 3 
  [saleItems] => stdClass Object 
  (
    [saleItem] => Array 
    (
      [0] => stdClass Object 
      ( 
        [reviewState] => open 
        [trackingDate] => 2011-11-03T01:06:43.547+01:00 
        [modifiedDate] => 2011-11-03T01:06:43.677+01:00 
        [clickDate] => 2011-10-30T22:57:57.383+01:00 
        [adspace] => stdClass Object 
        (
          [_] => Beslist.nl [id] => 1437603
        ) 
        [admedium] => stdClass Object 
        (
          [_] => 001. Program logo
          [id] => 535098
        ) 
        [program] => stdClass Object 
        (
          [_] => Zavvi NL
          [id] => 8991
        ) 
        [clickId] => 1565847253976339456 
        [clickInId] => 0 
        [amount] => 40.45 
        [commission] => 2.83 
        [currency] => EUR 
        [gpps] => stdClass Object 
        (
          [gpp] => Array 
          (
            [0] => stdClass Object 
            (
              [_] => shoplink 
              [id] => zpar0 
            ) 
          ) 
        ) 
        [trackingCategory] => stdClass Object 
        (
          [_] => Default
          [id] => 45181
        ) 
        [id] => 46a4f84a-ba9a-45b3-af86-da5f3ec29648 
      )
    )
  )
)

I want to have the data (with a foreach loop) from program, commission and gpp->_. I can get the data from program and commission like this:

foreach ($sales->saleItems->saleItem as $sale) {
  $programma    = $sale->program->_;
  $commissie    = $sale->commission;
}

Works like a charm. However I can’t get the data from the gpp->_ (want to have shoplink as result). I currently have:

foreach ($sales->saleItems->saleItem->gpps->gpp as $tracking) {
  echo $tracking->_;
}

I get the error “Trying to get property of non-object”. I’ve tried lots if variations and can’t get it to work. Think I’m really close. Anyone has a solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:16:00+00:00Added an answer on May 26, 2026 at 11:16 pm

    This should work

       foreach ($sales->saleItems->saleItem as $sale) {
            foreach($sale->gpps->gpp as $tracking) {
                echo $tracking->_;
        }
    

    As saleItem is an array, you won’t be able to use chaining on it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here I have an arbitrary IEnumerable<T> . And I'd like to page it using
ASP.NET newbie here I have coded up an ASP.NET website and running on win'08
Alright, here's a quick explanation of what I am doing: I have a website
On my website I want the user to have the ability to login/logout from
I am developing a website with nav items that cover the whole stage from
I have a website that needs to pull information from two diffferent XML data
here's a problem I've solved from a programming problem website(codechef.com in case anyone doesn't
I'm building a website that fetches text from another page and insert it into
I have a classifieds website... The classifieds are displayed in a dynamic php page.
so here's the problem I have one form, it outputs search results after submit,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.