title: Codeigniter show results of database query
body: <p>I am trying to display some testimonials of my database, but after 2 days trying different code combinations I have to give up and hope that someone here knows better than me :)</p>
  
  <p>Here is what I have so far:</p>
  
  <p>model:</p>
  
  <pre><code>    function getTestimonials() {
      $this-&gt;db-&gt;select('*');
      $this-&gt;db-&gt;from('feedback_comments');   
      $c = $this-&gt;db-&gt;get();
      return $c;
      }
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>    $testimonials = $this-&gt;feedback_model-&gt;getTestimonials();
      $this-&gt;outputData['testimonials'] = $testimonials;
  </code></pre>
  
  <p>and finally the view:</p>
  
  <pre><code>    &lt;?php $i = 1; foreach($testimonials as $testimonial) { ?&gt;
      &lt;?php echo $testimonial-&gt;dated; ?&gt;, &lt;?php echo $testimonial-&gt;comment; ?&gt;
      &lt;?php } ?&gt;
  </code></pre>
  
  <p>For some reason, the results are not being displayed. It does not show any errors, but it does show 7 lines with two commas in each line, which is strange since the BD only has one record. </p>
  
  <p>Any clue on what I am doing wrong?</p>
  
  <p>Thanks in advance :)</p>