Search
 
SCRIPT & CODE EXAMPLE
 

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);
Comment

Codeingiter Pagination

$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();
Comment

PREVIOUS NEXT
Code Example
Php :: get shipping price of choosen shipping method woocommerce 
Php :: array_unshift 
Php :: middleware command in laravel 
Php :: contact form 7 in page template 
Php :: Movie Name -inurl:(htm|html|php|pls|txt) intitle:index.of “last modified” (mp4|wma|aac|avi) 
Php :: get all error message in array form laravel validation in laravel 
Php :: display data from two dimensional array in vew laravel 
Php :: orderby not working with groupby laravel 
Php :: laravel url with parameters blade 
Php :: how to add multiple images in php 
Php :: laravel collection first 
Php :: php dirname 
Php :: get array of last 3 dates with carbon 
Php :: laravel composer create project 
Php :: how to check if file is empty in php 
Php :: php file_get_contents html with special characters 
Php :: customize laravel pagination links 
Php :: laravel collection except 
Php :: php api connection 
Php :: transient wp 
Php :: php number multiple of 
Php :: how change resource route parameters lravel 
Php :: laravel request file empty 
Php :: php strict mopde 
Php :: add floater to open a modal in wordpress 
Php :: array in php 
Php :: get percentage rating in laravel 
Php :: truncate url rewrites magento 2 database 
Php :: enable trash for media wordpress 
Php :: yii2 activeform adding field css class 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =