title: How to use pagination in codeigniter with segments?
body: <p>I have one problem in Codeigniter pagination with segments. I need to pass segments with page number.</p>
  
  <p>Example: <a href="http://www.mysite.com/app/controller/method/param1/param2/page_number" rel="nofollow">http://www.mysite.com/app/controller/method/param1/param2/page_number</a></p>
  
  <pre><code>&lt;?php
  
  $this-&gt;load-&gt;library('pagination');
  $config['base_url'] = 'http://localhost/welcome/par1/para2/';
  $config['total_rows'] = 200;
  $config['per_page'] = 20;
  
  $this-&gt;pagination-&gt;initialize($config);
  
  echo $this-&gt;pagination-&gt;create_links();
  
  ?&gt;
  </code></pre>