Back to Top

How to use Pagination in CodeIgniter

Pagination is a number of rows to be fetched from the database and mostly found at the bottom of the page which allow you to navigate to a different page. Today I will show you to use pagination in CodeIgniter which is easy to use.

To Load the pagination library, following code is useful:

The library comes with around 20 configurable items and you need only the three items to create the links.

To use Pagination in CodeIgniter, you must have the Pagination library must be loaded.

Let’s check it out here

First of all, add following code into the model file.

To add above code into the function index and add one parameter $page=0 into the function.see in below:

Next,Move to the controller file and add following function into it:

Further Reading:

Image Upload in CodeIgniter
Get IP address in CodeIgniter
Prepping Functions in CodeIgniter

That’s it.This is all that you need in order to create pagination.I hope this post will help you. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Share:
Share on Facebook0Share on LinkedIn0Tweet about this on TwitterShare on Google+0Buffer this pageDigg thisShare on Reddit0

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular Posts

How to use HTML5 Page Visibility API

Posted on 2 years ago

Bhumi

How to add ColorDots in FullCalender?

Posted on 3 years ago

Bhumi

How To set up Signup Bonus in X-Cart

Posted on 5 years ago

Bhumi

How to use Mixins in LESS CSS?

Posted on 2 years ago

Bhumi

Facade implementation in Laravel

Updated 3 weeks ago

Bhumi

MySQL coalesce() function

Updated 17 years ago

Bhumi

How to use JavaScript Promise API?

Updated 17 years ago

Bhumi

What are Lambdas and Closures in PHP?

Updated 17 years ago

Bhumi

The Reader’s Poll – June 2015

Posted on 2 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 3 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 4 years ago

Bhumi