Are you a regular stikked user? Signup so you can keep track of your pastes!
  1. #views/commentsview.php                                        9,1            Bot
  2. <ol>
  3. <?php foreach ( $comments as $comment ) { ?>
  4.   <li><?= $comment ?></li>
  5. <?php } ?>
  6. </ol>
  7. </body>
  8. </html>
  9.  
  10. #controllers/blog.php                                          28,30-32       92%
  11.  
  12.   function comments()
  13.   {
  14.     $this->load->model('blog');
  15.     $data['comments'] = $this->blog->get_last_ten_entries();
  16.     //$this->load->view('commentsview', $data);
  17.   }
  18.  
  19.  
  20.  
  21. #models/blog.php                                               3,2-3          Top
  22. <?php
  23. class Blog extends Model {
  24.   function get_last_ten_entries()
  25.   {
  26.     return array('one', 'two', 'three');
  27.     //$query = $this->db->get('entries', 10);
  28.  
  29.  
  30.  

Reply to "codeigniter"

Here you can reply to the paste above

Create a snipurl

Make Private

Feeling clever? Set some advanced options.