title: PHP - CodeIgniter - Invalid argument supplied for foreach()
body: <p>I try to write a site with CodeIgniter but I've a problem with PHP. I'm sure that it's so simple and can't be wrong. But I don't know bugs from , just a newbie of CodeIgniter :)</p>
  
  <pre><code>    &lt;html&gt;  
      &lt;head&gt;  
          &lt;title&gt;&lt;?=$page_title?&gt;&lt;/title&gt;  
      &lt;/head&gt;  
      &lt;body&gt;  
          &lt;?php foreach($result as $row):?&gt;  
          &lt;h3&gt;&lt;? echo $row-&gt;title; ?&gt;&lt;/h3&gt;  
          &lt;p&gt;&lt;? echo $row-&gt;text; ?&gt;&lt;/p&gt;  
          &lt;?php endforeach;?&gt;  
      &lt;/body&gt;  
  &lt;/html&gt; 
  </code></pre>
  
  <p>I've a bug from this file :</p>
  
  <blockquote>
    <p>A PHP Error was encountered</p>
    
    <p>Severity: Warning</p>
    
    <p>Message: Invalid argument supplied for
    foreach()</p>
    
    <p>Filename: views/helloworld_view.php</p>
    
    <p>Line Number: 6</p>
  </blockquote>
  
  <p>thanks in advance for reading this :)</p>