title: Parse JSON can not get value
body: <p>My PHP cote return error:</p>
  
  <blockquote>
    <p>Undefined property: stdClass::$paging in   Trying to get property of non-object 
    Use of undefined constant total_items - assumed 'total_items' in</p>
  </blockquote>
  
  <p>How can I get <code>total_items</code>  value?</p>
  
  <p>This is JSON:</p>
  
  <pre><code>{
      "paging": {
          "total_items": 0,
          "current_page": 1,
          "total_pages": 0
       },
       "data": [],
       "facets": null
  }
  </code></pre>
  
  <pre class="lang-php prettyprint-override"><code>$content = file_get_contents($urll); 
  $clean_content = removeBomUtf8($content); 
  $decoded = json_decode($clean_content); 
  
  foreach ($decoded-&gt;data as $data) 
  { 
      $total_items = (string)$data-&gt;paging[0]-&gt;total_items; 
      echo total_items; 
  } ;
  </code></pre>