• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
See Customizing the Pagination.

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

#3
(11-11-2018, 10: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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.