PHP, Cannot use object of type stdClass as array
<pre><code>&lt;?php 
    foreach ($blogs as $blog) {
        $id         = $blog['id'];
        $title      = $blog['title'];
        $content    = $blog['content'];
?&gt;
        &lt;h1&gt; &lt;?php echo $title; ?&gt;&lt;/h1&gt;
        &lt;h1&gt; &lt;?php echo $content; ?&gt; &lt;/h1&gt;      
&lt;?php } ?&gt;  
</code></pre>

<p>This my code. everytime i run this code, this error pops up:</p>

<blockquote>
  <p>Fatal error: Cannot use object of type stdClass as array</p>
</blockquote>

<p>Please help.</p>
