Showing posts with label How To create Pagination in codeigniter. Show all posts
Showing posts with label How To create Pagination in codeigniter. Show all posts

Tuesday, 3 March 2015

How To create Pagination in codeigniter

How To create Pagination in codeigniter



Here I am Create Pagination Example in Codeigniter.

The Model


create model Model/news_model.php

provide a count of all the records in the News table, and retrieve a list of news from the table

The record_count() method returns the number of records and is needed because one of the options in the $config array for the pagination library is $config["total_rows"]

The get_news() method retrieves a list of all the records from the News table.
there are two arguments $start, $limit.
The arguments will be set in the controller.