Skip to content
saturngod edited this page Feb 12, 2012 · 1 revision

Paging

Paging is helping for page number , end page , etc.

Load paging class

$this->load->library('paging');

Init

$this->load->library('paging');
$current_page = 1;
$total_page = 100;
$limit = 10;
$page = $this->paging->init($current_page,$total_page,$limit);

output :

Array
(
    [current_page] => 1
    [total] => 100
    [limit] => 10
    [total_pages] => 10
    [start_point] => 1
    [end_point] => 10
    [next_page] => 2
    [prev_page] => 1
)

Clone this wiki locally