Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use the <a href="http://www.php.net/json_decode" rel="nofollow noreferrer"><code>json_decode</code></a> function, to decode your JSON string :</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); var_dump($data); </code></pre> <p><br> And you'll get something like this :</p> <pre><code>object(stdClass)[1] public 'inbox' =&gt; array 0 =&gt; object(stdClass)[2] public 'from' =&gt; string '55512351' (length=8) public 'date' =&gt; string '29/03/2010' (length=10) public 'time' =&gt; string '21:24:10' (length=8) public 'utcOffsetSeconds' =&gt; int 3600 public 'recipients' =&gt; array 0 =&gt; object(stdClass)[3] public 'address' =&gt; string '55512351' (length=8) public 'name' =&gt; string '55512351' (length=8) public 'deliveryStatus' =&gt; string 'notRequested' (length=12) public 'body' =&gt; string 'This is message text.' (length=21) 1 =&gt; object(stdClass)[4] public 'from' =&gt; string '55512351' (length=8) public 'date' =&gt; string '29/03/2010' (length=10) public 'time' =&gt; string '21:24:12' (length=8) public 'utcOffsetSeconds' =&gt; int 3600 public 'recipients' =&gt; array 0 =&gt; object(stdClass)[5] public 'address' =&gt; string '55512351' (length=8) public 'name' =&gt; string '55512351' (length=8) public 'deliveryStatus' =&gt; string 'notRequested' (length=12) public 'body' =&gt; string 'This is message text.' (length=21) .... .... </code></pre> <p><br> Now that you know the structure of the data, you can iterate over it ; for instance, you could use something like this :</p> <pre><code>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 'Body : ' . htmlspecialchars($note-&gt;body) . '&lt;br /&gt;'; echo '&lt;/p&gt;'; } </code></pre> <p><br> And you'll get this kind of output :</p> <pre><code>From : 55512351 Date : 29/03/2010 Body : This is message text. From : 55512351 Date : 29/03/2010 Body : This is message text. ... ... </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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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