when i use print_r for the response from API URL i got the following result:
stdClass Object(
[Messages] => Array
(
[0] => stdClass Object
(
[MessageID] => 990950058
[Recipient] => 966000000000
[Status] => Queued
)
[1] => stdClass Object
(
[MessageID] => 990950059
[Recipient] => 966500000000
[Status] => Queued
)
)
[NumberOfUnits] => 1
[Cost] => 0.00000
[Balance] => 2.89050
[TimeCreated] => 2016-11-10 14:03:49
[CurrencyCode] => SAR
)
the problem is i want to make a loop to read the values for MessageID how i can do it?
foreach($whateverYourPrintRd->Messages as $message) { echo $message->MessageId; }