title: Reading an array in a loop
body: <p>I'm trying to read an array and echo one of the variables in the array, like this:</p>
  
  <pre><code>foreach($result-&gt;http_response_body as $obj)    {
  echo $obj-&gt;items['address'];
  }
  </code></pre>
  
  <p>The array looks like this when i print it:</p>
  
  <pre><code>    stdClass Object
  (
  [http_response_body] =&gt; stdClass Object
      (
          [total_count] =&gt; 1322
          [items] =&gt; Array
              (
                  [0] =&gt; stdClass Object
                      (
                          [created_at] =&gt; Thu, 15 Jan 2015 08:35:06 GMT
                          [tag] =&gt; *
                          [id] =&gt; 54b77bba55edfbe50e662d3a
                          [address] =&gt; xxxx@xxxx.xx
                      )
  
                  [1] =&gt; stdClass Object
                      (
                          [created_at] =&gt; Thu, 15 Jan 2015 08:34:40 GMT
                          [tag] =&gt; *
                          [id] =&gt; 54b77ba055edfbe50e662cf6
                          [address] =&gt; xxxx@xxxx.xx
                      )
  
                  [2] =&gt; stdClass Object
                      (
                          [created_at] =&gt; Thu, 15 Jan 2015 08:31:56 GMT
                          [tag] =&gt; *
                          [id] =&gt; 54b77afc55edfbe50e662b0d
                          [address] =&gt; xxxx@xxxx.xx
                      )
  </code></pre>
  
  <p>But with my script i het this message:</p>
  
  <p>Notice: Trying to get property of non-object in /home/xxxxxxxx/domains/xxxxxxx.xx/public_html/MailGun/watchUnsubscribes.php on line 27</p>
  
  <p>What did I do wrong?</p>