title: how to link the pages using codeigniter pagination?
body: <p>how to link the pages using codeigniter pagination?</p>
  
  <p>the problem is with the variable $start its supposed to pass the start value to the database limit query . but its not.</p>
  
  <p>Model</p>
  
  <pre><code>public function fetch_countries($limit,$start) {
      $this-&gt;db-&gt;limit($limit, $start);
  
      //$query ="SELECT * FROM  mail_to Order By id Desc LIMIT ".$limit.",".$start;
      $query = $this-&gt;db-&gt;get("mail_to");
  
     //$qry=$this-&gt;db-&gt;query($query);
     var_dump($query-&gt;result_array());
  
      if($query-&gt;num_rows()&gt;0){
  
         return $query-&gt;result_array();
  
      }
      else
      {
      return false;
  }
  
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>public function example1() {
      $config = array();
      $config["base_url"] = base_url() . "index.php/admin/user/example1";
      $config["total_rows"] = $this-&gt;mdl_user-&gt;record_count();
      $config["per_page"] = 5;
  
      $config["uri_segment"] = 3;
  
      $this-&gt;pagination-&gt;initialize($config);
  
  
  
  
      $page = ($this-&gt;uri-&gt;segment(3)) ? $this-&gt;uri-&gt;segment(3) : 0;
  
      //var_dump($config['per_page']);
      $data["results"] = $this-&gt;mdl_user-&gt;fetch_countries($config["per_page"],$page);
          //var_dump($data['results']);
      $data["links"] = $this-&gt;pagination-&gt;create_links();
  
      $this-&gt;load-&gt;view("example1", $data);
  }
  </code></pre>