title: object(stdClass) data retrieving error
body: <p>I am using codeigniter php framework and I fetched data using codeigniter database functions and store it in a variable its structure is object(stdClass) when I tried to fetch row data using foreach loop it show error </p>
  
  <pre><code>foreach ($cat_data as $row_cat)
  {       
      echo $row_cat-&gt;id . " " . $row_cat-&gt;name;       
  }
  </code></pre>
  
  <p>It returns Message:  </p>
  
  <blockquote>
    <p>Trying to get property of non-object</p>
  </blockquote>
  
  <p>and when I use <code>echo $row_cat;</code> in foreach loop it show me only first row </p>
  
  <p>In my database 3 records exists </p>