title: Trying to get property of non-object in stdclass object
body: <p>I'm trying to integrate with an API. Assuming the following code works.</p>
  
  <pre><code>$lists = $ac-&gt;api("list/list_", array("ids" =&gt; "all"));
  
              echo"&lt;pre&gt;"; print_r( $lists); echo"&lt;/pre&gt;";
  </code></pre>
  
  <p>Outputs the following stdclass object</p>
  
  <pre><code>stdClass Object
  (
      [0] =&gt; stdClass Object
          (
              [id] =&gt; 1
              [name] =&gt; List 3
              [cdate] =&gt; 2018-02-27 08:19:39
              [private] =&gt; 0
              [userid] =&gt; 1
              [subscriber_count] =&gt; 0
          )
  
      [result_code] =&gt; 1
      [result_message] =&gt; Success: Something is returned
      [result_output] =&gt; json
      [http_code] =&gt; 200
      [success] =&gt; 1
  )
  </code></pre>
  
  <p>The following code</p>
  
  <pre><code>            foreach($lists as $list) {
  
                     echo $list-&gt;id;
  
                 }
  </code></pre>
  
  <p>Shows me an error </p>
  
  <pre><code>Trying to get property of non-object
  </code></pre>
  
  <p>The line $list->id is wrong. How can I fix this?</p>