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 :: Route::whereIn 
Php :: install wget downloader php 
Php :: gmail smtp not working laravel 
Php :: laravel How to query foreign relations data along with multiple main records 
Php :: spatie sluggable not working 
Php :: laravel task scheduler error 
Php :: how to count number of rows in sql using php 
Php :: php artisan vendor:publish aborted 
Php :: database interaction in codeigniter 
Php :: pass in value in route group middle ware 
Php :: laravel Undefined index: token on reset 
Php :: larvel still laod the local file location on production 
Php :: show all tags 
Php :: curl upload image huawei 
Php :: WPML - Add a floating language switcher to the footer 
Php :: Display a variable containing html in laravel 
Php :: laravel select option form add please select option 
Php :: php Display random custom content in WooCommerce shop archive loop 
Php :: invalid menu item in wordpress 
Php :: small rce php 
Php :: laravel connection timed out 
Php :: ErrorException Undefined index(laravel 7 array helpers) 
Php :: upgrade phpopensuse 
Php :: iis change php fastcgi user 
Php :: command to run after exposing route symfony 
Php :: how to store api response to avariable in phpp 
Php :: install PHP extension "amqp" not found, please install it 
Php :: live search in ajax 
Php :: codeigniter 4 query builder select 
Php :: prestashop get product id 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =