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

  • SEARCH
  • Home
  • 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 6350461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:48:50+00:00 2026-05-24T21:48:50+00:00

I am writing a little web app for ocean tides using PHP. I am

  • 0

I am writing a little web app for ocean tides using PHP. I am having problems figuring out how to access the array returned (which PHP converted to a stdObject).

The WSDL file is located at: http://opendap.co-ops.nos.noaa.gov/axis/webservices/highlowtidepred/wsdl/HighLowTidePred.wsdl

My PHP code is:

    $wsdl = "http://opendap.co-ops.nos.noaa.gov/axis/webservices/highlowtidepred/wsdl/HighLowTidePred.wsdl";

    $tides = new soapclient($wsdl);

    $tideParams = array(  
        'stationId' => '8454000',
        'beginDate' => '20110821 00:00',
        'endDate' => '20110821 23:59',
        'datum' => '0',
        'unit' => '0',
        'timeZone' => '0'
    );

    $tideRet = $tides->getHighLowTidePredictions($tideParams);
    var_dump($tideRet);

This dump returns:

   object(stdClass)#2 (1) {
      ["HighLowValues"]=>
      object(stdClass)#3 (1) {
        ["item"]=>
        object(stdClass)#4 (2) {
          ["data"]=>
          array(4) {
            [0]=>
            object(stdClass)#5 (3) {
              ["time"]=>
              string(5) "00:35"
              ["pred"]=>
              float(3.8)
              ["type"]=>
              string(1) "H"
            }
            [1]=>
            object(stdClass)#6 (3) {
              ["time"]=>
              string(5) "05:45"
              ["pred"]=>
              float(0.7)
              ["type"]=>
              string(1) "L"
            }
            [2]=>
            object(stdClass)#7 (3) {
              ["time"]=>
              string(5) "12:49"
              ["pred"]=>
              float(4.2)
              ["type"]=>
              string(1) "H"
            }
            [3]=>
             object(stdClass)#8 (3) {
              ["time"]=>
              string(5) "18:32"
              ["pred"]=>
              float(1.3)
              ["type"]=>
              string(1) "L"
            }
          }
          ["date"]=>
          string(10) "08/21/2011"
        }
      }
    }

I have no idea how to read into this and my googling hasn’t helped much either. Any help or direction is appreciated.

  • 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-24T21:48:51+00:00Added an answer on May 24, 2026 at 9:48 pm

    That is a dynamic PHP object. All of the quoted items are property names, so to get to the data array:

    $data = $tides->getHighLowTidePredictions($tideParams)
                  ->HighLowValues
                  ->item
                  ->data;
    

    Then, if you want to get a particular item’s time property, for example, you would address that array index and look up the time property:

     $data[0]->time;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a little web app with webpy, and I'm wondering if anyone has
I'm writing a little web-app and want to check the users connectivity before I
I'm writing a basic little forums web app (for fun and to sharpen the
I'm writing a little single page app (using knockout.js :-)) whereby i have a
I'm writing a little web-based utility for my brother who needs to merge columns
I'm writing a little desktop app that should be able to encrypt a data
I'm writing a little debug app for a bit of kit we're developing and
I'm writing a small web app for myself in Rails and I want it
I'm writing a little website (webapp) in php+codeigniter, I'd really like to make it
I am in the process of writing a web app that includes a reporting

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.