1

I'm trying to create the following array in PHP for a SOAP call:

Picture of the array

I have tried to make the array myself but I am stuck at this piece of code:

$params = array(
"ReportId" => xxxxx,
"Parameters" =>  array( // <-- This array should be in 'Parameter' 
                "Name" => "xxxxx",
                "Value" => "xxxxx"
                )   
);

$client->__soapCall("Get", array("securityKey" => "xxxxxxxxxxxxxxxx", "parms" => $params));

As you can see here I need to create an array within 'Parameter' containing the 'Name' and the 'Value', this 'Parameter' should be in 'Parameters'.

Any ideas on how to achieve this?

1 Answer 1

1

If you want to insert the value in Parameter key, you can write the array like this

$params = array(
  "ReportId" => xxxxx,
  "Parameters" => array(
    'Parameter' => array(
       "Name" => "xxxxx",
       "Value" => "xxxxx"
     )   
  )
);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.