Welcome Guest, Not a member yet? Register   Sign In
Pagination problem
#1

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
Reply
#2

(This post was last modified: 11-11-2018, 09:45 AM by enelson.)

See Customizing the Pagination.

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

(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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB