CodeIgniter Forums
Pagination problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Pagination problem (/showthread.php?tid=72139)



Pagination problem - azaka9541 - 11-11-2018

Hi, I'm newbie for codeigniter.

I'm now learning of pagination class, and while trying to practice example in Codeigniter's documentation, I had a problem

Code:
$this->load->library('pagination');

       $config['base_url'] = 'http://example.com/index.php/test/page/';
       $config['total_rows'] = 200;
       $config['per_page'] = 20;

       
       $this->pagination->initialize($config);
       
       echo $this->pagination->create_links();
This is the exactly same example in the documentation, and I think it doesn't work in php 7.1.

I display pagination like "123>Last>" which should have had 10 links(but three links were shown up).

What mistake did I make? Huh


RE: Pagination problem - enelson - 11-11-2018

See Customizing the Pagination.

Adjust the value of $config[‘num_links’] = 2;  to some other value


RE: Pagination problem - azaka9541 - 11-11-2018

(11-11-2018, 09:44 AM)enelson Wrote: See Customizing the Pagination.

Adjust the value of $config[‘num_links’] = 2;  to some other value

Thx a lot for my lazy question. I'll put more effort next time.