0

I am completely stuck on this issue so your help is greatly appreciated!

I simply need to pull the ValidationCode out of this existing XML object.

Here's is what I get when I do:

print_r($response);

TheResponse Object ( [ResponseText] => xxxxxxxxx [ResponseXml] => SimpleXMLElement Object ( [ValidationRequest] => SimpleXMLElement Object ( [AccountSid] => xxxxxxxx [PhoneNumber] => +15555555555 [FriendlyName] => SimpleXMLElement Object ( ) [ValidationCode] => 601532 ) ) [HttpStatus] => 200 [Url] => https://api.dddddd.com//2010-04-01/Accounts/xxxxxx/OutgoingCallerIds [QueryString] => [IsError] => [ErrorMessage] => )

How in the WORLD do I access that Validation Code using php?

Thank you for your assistance!

2 Answers 2

1
$code = $response->ResponseXml->ValidationRequest->ValidationCode;
Sign up to request clarification or add additional context in comments.

1 Comment

Life saver! Thank you friend. I'll accept your answer as soon as it lets me.
1
$ValidationCode=$response->ResponseXml->ValidationRequest->ValidationCode;

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.