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

« First  < 1 2 3 4 5 >  Last »


PHP 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(); 


Can anyone help me explain how to create paging with CI 3 ?

What is ?

PHP Code:
$config['total_rows'] = 200;
$config['per_page'] = 20

what is 20 ?

and what is 200 ?

Thanks in advance.
" If I looks more intelligence please increase my reputation."
Reply
#2

Read the CI Documentation on the Pagination Library, it's right there on top.

Pagination Library
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

total_rows This number represents the total rows in the result set you are creating pagination for. Typically this number will be the total rows that your database query returned.

I do not understand what's the purpose for?

$config['total_rows'] = 200;

I do not understand what is the total rows your database query returned?  and what's the difference between:

$config['total_rows'] = 200;

               and

$config['per_page'] = 20;


Thanks.  notes:  I already read the manual and still do not understand it.
" If I looks more intelligence please increase my reputation."
Reply




Theme © iAndrew 2016 - Forum software by © MyBB