Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

pagination in codeigniter with example

// Controller End
$config = array();
$config["base_url"] = base_url() . "index.php/StudentPagination_Controller/index";
$config["total_rows"] = $this->StudentPagination_Model->get_count();
$config["per_page"] = 10;
$config["uri_segment"] = 3;

$this->pagination->initialize($config);


$page = ($this->uri->segment(3))? $this->uri->segment(3) : 0;

$data["links"] = $this->pagination->create_links();

$data['student'] = $this->StudentPagination_Model->get_students($config["per_page"], $page);

$this->load->view('pagination', $data);
Source by www.google.com #
 
PREVIOUS NEXT
Tagged: #pagination #codeigniter
ADD COMMENT
Topic
Name
6+5 =