Posted By

mattstopa on 02/08/10


Tagged


Versions (?)

Basic Code Igniter Controller pt. 2


 / Published in: PHP
 

  1. <?php
  2. class Blog extends Controller {
  3.  
  4. function index()
  5. {
  6. $this->load->model('Blog');
  7. $data['query'] = $this->Blog->get_last_ten_entries();
  8. $this->load->view('blogview', $dog);
  9. }
  10. function comments($id, $name)
  11. {
  12. echo "your id is: " . $id;
  13. echo "your name is: " . $name;
  14. }
  15.  
  16. }
  17. ?>

Report this snippet  

You need to login to post a comment.