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 4073932
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:05:44+00:00 2026-05-20T17:05:44+00:00

I’m currently working with a webserivce using nusoap to build my method calls, my

  • 0

I’m currently working with a webserivce using nusoap to build my method calls,
my problem is the array which is returned and how to format this in a manner which is useable, other projects I’ve worked on returns s much simpler structured xml file, were i could use $xml = simplexml_load_string($xmlfile); to build and sort my arrays,

this is the nusoap call

$PickUpDateTime='2011-03-17T09:00:00';
$ReturnDateTime='2011-03-21T09:00:00';
require_once('nusoap/lib/nusoap.php');
$wsdl="Srvc.asmx?WSDL";
$client = new nusoap_client($wsdl, 'wsdl'); 
$param = array('OTA_VehAvailRateRQ' => 
        array('VehAvailRQCore' => 
           array('VehRentalCore' => 
            array('PickUpDateTime'=>$PickUpDateTime,
                'ReturnDateTime'=>$ReturnDateTime,
                'PickUpLocation' => array('LocationCode' =>$location),
                'ReturnLocation' => array('LocationCode' =>$location)
            )//PickUpDateTime, ReturnDateTime, PickUpLocation, ReturnLocation
               )//VehRentalCore
        )//VehAvailRQCore
        ); //OTA_VehAvailRateRQ

// LOAD OUR VARIABLE WITH THE RETURN ARRAY
$res = $client->call('GetVehAvailRate', $param);

nomally at this point I would use the simplexml_load_string(); but this dosnt seem to work with this call, doing a dump of $res produces.. ( Lots of data is missing due to the posting limit… but once the array gets to the Vehicle theres a lor more arrays in there…

    Array
(
    [Success] => 
    [VehAvailRSCore] => Array
        (
            [VehRentalCore] => Array
                (
                    [PickUpLocation] => Array
                        (
                            [!LocationCode] => LOCATIONNAME
                        )

                    [ReturnLocation] => Array
                        (
                            [!LocationCode] => LOCATIONNAME
                        )

                    [!PickUpDateTime] => 2011-03-23T09:00:00
                    [!ReturnDateTime] => 2011-03-31T09:00:00
                )

            [VehVendorAvails] => Array
                (
                    [VehVendorAvail] => Array
                        (
                            [Vendor] => Array
                                (
                                    [!Code] => AD
                                )

                            [VehAvails] => Array
                                (
                                    [VehAvail] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [VehAvailCore] => Array
                                                        (
                                                            [Vehicle] => Array ()
                                                        )

                                                )

                                            [1] => Array
                                                (
                                                    [VehAvailCore] => Array
                                                        (
                                                            [Vehicle] => Array ()
                                                        )
                                                )

                                            [2] => Array
                                                (
                                                    [VehAvailCore] => Array
                                                        (
                                                            [Vehicle] => Array()
                                                        )
                                                )

                                            [3] => Array
                                                (
                                                    [VehAvailCore] => Array
                                                        (
                                                            [Vehicle] => Array()

                                                        )
                                        )

                                )

                            [Info] => Array
                                (
                                    [LocationDetails] => 
                                )

                        )

                )

        )

    [!EchoToken] => xxxxxxxx
    [!TimeStamp] => 2011-03-18T11:35:19.165125-04:00
    [!Target] => xxxxx
    [!Version] => xxxxxx
    [!TransactionIdentifier] => xxx
)

When trying to loop through the multiarray using a foreach loop is proving a little more harder than first thought…

now when Im trying to access each element using a foreach loop, I’m having to use the literal calls, ie: $res[‘VehAvailRSCore’]; also those exclamation marks i havent came across before either: ie !LocationCode, normaly this would be just $res->LocationCode

So my question is this… how can i use this array to my advantage?
just so i can call each array element, and possibly add this / these values to an other array so i can format my page better?

thanks

  • 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-20T17:05:45+00:00Added an answer on May 20, 2026 at 5:05 pm

    Dude, nusoap is dead. Do not use it. Use PHP’s built-in SOAP class instead.

    Accessing the array values has to done with

    $a['key1']['subkey']['subsubkey']['subsubkey']
    
    • PHP itself provides no way apart from that.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,

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.