title: <?php echo $this->pagination->creaerte_links(); ?> Pagination not working in codeigniter
body: <p>i am newbie in codeigniter and i want to apply pagination on my table. i followed a tutorial but on view my pagination is not seen. my table has already six rows of data. i am getting successfully all data but pagination not working.</p>
  
  <p>here is my controller code:</p>
  
  <pre><code>class news_cont extends CI_Controller
  {
     public function __construct()
          {
          parent::__construct();
           $this-&gt;load-&gt;library("pagination");
          $this-&gt;load-&gt;helper('url');
          $this-&gt;load-&gt;model('Post_newspaperjob_model','pnm');
          }
  
     public function index()
     {
      $this-&gt;load-&gt;library("pagination");
     $config['base_url'] = base_url().'news/news_cont/index';
     $config['per_page'] = 10;
     $config['num_links'] = 5;
     $config['total_rows'] =  $this-&gt;db-&gt;get('pp_jobcategories')-&gt;num_rows();
     $this-&gt;pagination-&gt;initialize($config); 
     $data['query'] = $this-&gt;db-&gt;get('pp_jobcategories',$config['per_page'],$this-&gt;uri-&gt;segment(3));  
     $this-&gt;load-&gt;view('newspapers/news',$data);
   }
  }
  </code></pre>
  
  <p>my model code : </p>
  
  <pre><code>public function getallcategories()
      {
          $query = $this-&gt;db-&gt;query('select * from pp_jobcategories');
          return $query-&gt;result();
      }
  </code></pre>
  
  <p>my view code :</p>
  
  <pre><code>&lt;?php
  foreach($query-&gt;result() as $row){
    echo "&lt;p&gt;" . $row-&gt;j_name . "&lt;/p&gt;";
  }
  ?&gt;
  &lt;?php  echo $this-&gt;pagination-&gt;create_links(); ?&gt;
  </code></pre>