stdClass object and foreach loops

后端 未结 5 623
日久生厌
日久生厌 2020-12-03 05:48

I am using the following code to get data from a website using Soap.

$client = new SoapClient(\'http://some.url.here\');
class SMSParam {
    public $CellNu         


        
5条回答
  •  无人及你
    2020-12-03 06:00

    you need to specify your SMSIncomingMessage arrays object key.

    $result->GetIncomingMessagesResult->SMSIncomingMessage[0]->Reference;
    

    or

    foreach ($result->GetIncomingMessagesResult->SMSIncomingMessage as $message)
    {
    $reference = $message[0]->Reference;
    //...
    }
    

提交回复
热议问题