Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Looks like the recipients property is an array, try this:</p> <p> <pre><code>$json = '{"inbox":[{"from":"55512351","date":"29\/03\/2010","time":"21:24:10","utcOffsetSeconds":3600,"recipients":[{"address":"55512351","name":"55512351","deliveryStatus":"notRequested"}],"body":"This is message text."},{"from":"55512351","date":"29\/03\/2010","time":"21:24:12","utcOffsetSeconds":3600,"recipients":[{"address":"55512351","name":"55512351","deliveryStatus":"notRequested"}],"body":"This is message text."},{"from":"55512351","date":"29\/03\/2010","time":"21:24:13","utcOffsetSeconds":3600,"recipients":[{"address":"55512351","name":"55512351","deliveryStatus":"notRequested"}],"body":"This is message text."},{"from":"55512351","date":"29\/03\/2010","time":"21:24:13","utcOffsetSeconds":3600,"recipients":[{"address":"55512351","name":"55512351","deliveryStatus":"notRequested"}],"body":"This is message text."}]}'; $data = json_decode($json); print_r($data); foreach ($data-&gt;inbox as $note) { echo '&lt;p&gt;'; echo 'From : ' . htmlspecialchars($note-&gt;from) . '&lt;br /&gt;'; echo 'Date : ' . htmlspecialchars($note-&gt;date) . '&lt;br /&gt;'; echo 'Time : ' . htmlspecialchars($note-&gt;time) . '&lt;br /&gt;'; echo 'Body : ' . htmlspecialchars($note-&gt;body) . '&lt;br /&gt;'; foreach($note-&gt;recipients as $recipient) { echo 'To (address) : ' . htmlspecialchars($recipient-&gt;address) . '&lt;br /&gt;'; echo 'To (name) : ' . htmlspecialchars($recipient-&gt;name) . '&lt;br /&gt;'; echo 'Status : ' . htmlspecialchars($recipient-&gt;deliveryStatus) . '&lt;br /&gt;'; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload