title: how to fetch data in multiple div from database in codeigniter
body: <p>I am new on codeigniter .I have the one table with following column name.</p>
  
  <pre><code>id month day year review source
  </code></pre>
  
  <p>the table name is testimonial.there is lots of row in testimonial table.i want all testimonial details should be display in separate box.how i fetch data from database in separate box . </p>
  
  <p><strong>I have tried:</strong></p>
  
  <p><strong>// In controller</strong> </p>
  
  <pre><code>class edit_content extends CI_Controller {
  
      function edit_content()
      {
          parent::__construct();
          $this-&gt;load-&gt;model('editcontent_model');
          $this-&gt;load-&gt;helper('url');
          $this-&gt;load-&gt;library('acl');
          $this-&gt;data = $this-&gt;editcontent_model-&gt;get_contents();
      }
  }
  </code></pre>
  
  <p><strong>// In view</strong></p>
  
  <pre><code> &lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;Content&lt;/th&gt;
      &lt;/tr&gt;
  
      &lt;?php foreach($this-&gt;data  as $r): ?&gt;
          &lt;tr&gt;
              &lt;tr&gt;&lt;?php echo $r['review']; ?&gt;
          &lt;/tr&gt;
      &lt;?php endforeach; ?&gt;
  
  &lt;table&gt;
  </code></pre>
  
  <p><strong>// in model</strong></p>
  
  <pre><code>class editcontent_model extends CI_Model {
      var $CI; 
  
      function editcontent_model(){
          parent::__construct();
      }
  
      function get_contents() {
          $this-&gt;db-&gt;select('review');
          $this-&gt;db-&gt;from('testimonials');
          $query = $this-&gt;db-&gt;get();
          return $result = $query-&gt;result();
          $this-&gt;load-&gt;view('edit_content/edit_content', $result);
      }
  }
  </code></pre>
  
  <p>But this i only used for one column. and its not working i was trying to get all column details in one box. Please help me on this.</p>
  
  <p>I am new on codeigniter please help me to find the solution </p>