{"id":2935,"date":"2017-11-13T19:47:39","date_gmt":"2017-11-13T19:47:39","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=2935"},"modified":"2019-09-05T17:50:18","modified_gmt":"2019-09-05T17:50:18","slug":"codeigniter-pagination-library-bootstrap","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/","title":{"rendered":"Pagination in CodeIgniter"},"content":{"rendered":"<p>Pagination is the most required feature in the data list of the web application. Generally, pagination is used when data is retrieved from the database and listed on the web page. The pagination feature is very useful to list the huge number of dynamic records from the database. It helps to load data faster and make the web application user-friendly.<\/p>\n<p>If your web application built with the CodeIgniter framework, it\u2019s very easy to implement pagination in the data list. CodeIgniter provides the <b>Pagination class<\/b> to create pagination links for the results set. In this tutorial, we will provide a step-by-step guide to implement pagination functionality in CodeIgniter using Pagination library.<\/p>\n<p>In the example <b>CodeIgniter pagination<\/b> script, we will fetch the posts data from the database and list the records with pagination links. The following functionality will be implemented to demonstrate <b>pagination in CodeIgniter<\/b> framework.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>Retrieve data from the MySQL database.<\/li>\n<li>Create pagination links using Pagination library.<\/li>\n<li>List the records with pagination links.<\/li>\n<\/ul>\n<p class=\"seeAlso\"><span><\/span><a href=\"https:\/\/www.codexworld.com\/php-pagination-class-with-mysql\/\">Pagination in PHP with MySQL<\/a><\/span><\/p>\n<h2>Create Database Table<\/h2>\n<p>To store the post&#8217;s data a table is required in the database. The following SQL creates a <code>posts<\/code> table with some basic fields in the MySQL database.<\/p>\n<pre style=\"color: rgb(0, 0, 0);\"><span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">CREATE<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">TABLE<\/span> <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`posts`<\/span> (\r\n <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`id`<\/span> <span class=\"hljs-built_in\" style=\"color: rgb(0, 134, 179);\">int<\/span>(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">11<\/span>) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span> AUTO_INCREMENT,\r\n <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`title`<\/span> <span class=\"hljs-built_in\" style=\"color: rgb(0, 134, 179);\">varchar<\/span>(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">255<\/span>) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">COLLATE<\/span> utf8_unicode_ci <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span>,\r\n <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`created`<\/span> datetime <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span>,\r\n <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`modified`<\/span> datetime <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span>,\r\n <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`status`<\/span> tinyint(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span>) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">DEFAULT<\/span> <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'1'<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">COMMENT<\/span> <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'1=Active | 0=Inactive'<\/span>,\r\n PRIMARY <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">KEY<\/span> (<span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`id`<\/span>)\r\n) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">ENGINE<\/span>=<span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">InnoDB<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">DEFAULT<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">CHARSET<\/span>=utf8 <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">COLLATE<\/span>=utf8_unicode_ci;<\/pre>\n<h2>Controller (Posts.php)<\/h2>\n<p>The Posts controller generates the pagination links and loads the data list view.<\/p>\n<ul class=\"step_list\">\n<li><b>__construct()<\/b> &#8211;\n<ul class=\"bullet_disk_list\">\n<li>Load the Pagination library.<\/li>\n<li>Load the Post model.<\/li>\n<li>Define the limit of records to display per page.<\/li>\n<\/ul>\n<\/li>\n<li><b>index()<\/b> &#8211;\n<ul class=\"bullet_disk_list\">\n<li>Get the total record count using <code>getRows()<\/code> method of Post model.<\/li>\n<li>Specify the configuration in <code>$config<\/code> array for pagination.<\/li>\n<li>Initialize the Pagination class with the configuration options using <code>initialize()<\/code> method.<\/li>\n<li>Define offset by the page URI segment.<\/li>\n<li>Fetch records from the database using <code>getRows()<\/code> method of Post model.<\/li>\n<li>Pass the posts data and load the list view.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><span style=\"color: #0000BB\">&lt;?php&nbsp;defined<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'BASEPATH'<\/span><span style=\"color: #007700\">)&nbsp;OR&nbsp;exit(<\/span><span style=\"color: #DD0000\">'No&nbsp;direct&nbsp;script&nbsp;access&nbsp;allowed'<\/span><span style=\"color: #007700\">); <br \/> <br \/>class&nbsp;<\/span><span style=\"color: #0000BB\">Posts&nbsp;<\/span><span style=\"color: #007700\">extends&nbsp;<\/span><span style=\"color: #0000BB\">CI_Controller&nbsp;<\/span><span style=\"color: #007700\">{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;<\/span><span style=\"color: #0000BB\">__construct<\/span><span style=\"color: #007700\">()&nbsp;{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">parent<\/span><span style=\"color: #007700\">::<\/span><span style=\"color: #0000BB\">__construct<\/span><span style=\"color: #007700\">(); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Load&nbsp;pagination&nbsp;library <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">load<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">library<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'pagination'<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Load&nbsp;post&nbsp;model <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">load<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">model<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'post'<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Per&nbsp;page&nbsp;limit <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">perPage&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">10<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;<\/span><span style=\"color: #0000BB\">index<\/span><span style=\"color: #007700\">(){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$data&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$conditions&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;array(); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$uriSegment&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">3<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Get&nbsp;record&nbsp;count <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$conditions<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'returnType'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'count'<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$totalRec&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">post<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">getRows<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$conditions<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Pagination&nbsp;configuration <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'base_url'<\/span><span style=\"color: #007700\">]&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<\/span><span style=\"color: #0000BB\">base_url<\/span><span style=\"color: #007700\">().<\/span><span style=\"color: #DD0000\">'posts\/index\/'<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'uri_segment'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #0000BB\">$uriSegment<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'total_rows'<\/span><span style=\"color: #007700\">]&nbsp;&nbsp;=&nbsp;<\/span><span style=\"color: #0000BB\">$totalRec<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'per_page'<\/span><span style=\"color: #007700\">]&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">perPage<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Initialize&nbsp;pagination&nbsp;library <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">pagination<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">initialize<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Define&nbsp;offset <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$page&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">uri<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">segment<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$uriSegment<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$offset&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;!<\/span><span style=\"color: #0000BB\">$page<\/span><span style=\"color: #007700\">?<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">:<\/span><span style=\"color: #0000BB\">$page<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Get&nbsp;records <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$conditions&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;array( <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">'start'&nbsp;<\/span><span style=\"color: #007700\">=&gt;&nbsp;<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">, <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #DD0000\">'limit'&nbsp;<\/span><span style=\"color: #007700\">=&gt;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">perPage <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$data<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'posts'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">post<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">getRows<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$conditions<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Load&nbsp;the&nbsp;list&nbsp;page&nbsp;view <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">load<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">view<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'posts\/index'<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$data<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>}<\/span><\/pre>\n<h2>Model (Post.php)<\/h2>\n<p>The Post model is used to retrieve posts data from the database.<\/p>\n<ul class=\"bullet_disk_list\">\n<li><b>getRows()<\/b> &#8211; Fetch the records from posts table based on the conditions provided in the <code>$params<\/code> array. Returns data as an array.<\/li>\n<\/ul>\n<pre><span style=\"color: #0000BB\">&lt;?php&nbsp;defined<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'BASEPATH'<\/span><span style=\"color: #007700\">)&nbsp;OR&nbsp;exit(<\/span><span style=\"color: #DD0000\">'No&nbsp;direct&nbsp;script&nbsp;access&nbsp;allowed'<\/span><span style=\"color: #007700\">); <br \/> <br \/>class&nbsp;<\/span><span style=\"color: #0000BB\">Post&nbsp;<\/span><span style=\"color: #007700\">extends&nbsp;<\/span><span style=\"color: #0000BB\">CI_Model<\/span><span style=\"color: #007700\">{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;<\/span><span style=\"color: #0000BB\">__construct<\/span><span style=\"color: #007700\">()&nbsp;{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Set&nbsp;table&nbsp;name <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">table&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'posts'<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/* <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Fetch&nbsp;records&nbsp;from&nbsp;the&nbsp;database <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;array&nbsp;filter&nbsp;data&nbsp;based&nbsp;on&nbsp;the&nbsp;passed&nbsp;parameters <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">function&nbsp;<\/span><span style=\"color: #0000BB\">getRows<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$params&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;array()){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">select<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'*'<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">from<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">table<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">array_key_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"where\"<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">)){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach(<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'where'<\/span><span style=\"color: #007700\">]&nbsp;as&nbsp;<\/span><span style=\"color: #0000BB\">$key&nbsp;<\/span><span style=\"color: #007700\">=&gt;&nbsp;<\/span><span style=\"color: #0000BB\">$val<\/span><span style=\"color: #007700\">){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">where<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$key<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$val<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">array_key_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"returnType\"<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">)&nbsp;&amp;&amp;&nbsp;<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'returnType'<\/span><span style=\"color: #007700\">]&nbsp;==&nbsp;<\/span><span style=\"color: #DD0000\">'count'<\/span><span style=\"color: #007700\">){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$result&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">count_all_results<\/span><span style=\"color: #007700\">(); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}else{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">array_key_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"id\"<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">)&nbsp;||&nbsp;(<\/span><span style=\"color: #0000BB\">array_key_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"returnType\"<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">)&nbsp;&amp;&amp;&nbsp;<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'returnType'<\/span><span style=\"color: #007700\">]&nbsp;==&nbsp;<\/span><span style=\"color: #DD0000\">'single'<\/span><span style=\"color: #007700\">)){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!empty(<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'id'<\/span><span style=\"color: #007700\">])){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">where<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'id'<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'id'<\/span><span style=\"color: #007700\">]); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$query&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">get<\/span><span style=\"color: #007700\">(); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$result&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$query<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">row_array<\/span><span style=\"color: #007700\">(); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}else{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">order_by<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'id'<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #DD0000\">'desc'<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">array_key_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"start\"<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">)&nbsp;&amp;&amp;&nbsp;<\/span><span style=\"color: #0000BB\">array_key_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"limit\"<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">)){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">limit<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'limit'<\/span><span style=\"color: #007700\">],<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'start'<\/span><span style=\"color: #007700\">]); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}elseif(!<\/span><span style=\"color: #0000BB\">array_key_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"start\"<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">)&nbsp;&amp;&amp;&nbsp;<\/span><span style=\"color: #0000BB\">array_key_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"limit\"<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">)){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">limit<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$params<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'limit'<\/span><span style=\"color: #007700\">]); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$query&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">get<\/span><span style=\"color: #007700\">(); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$result&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;(<\/span><span style=\"color: #0000BB\">$query<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">num_rows<\/span><span style=\"color: #007700\">()&nbsp;&gt;&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">)?<\/span><span style=\"color: #0000BB\">$query<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">result_array<\/span><span style=\"color: #007700\">():<\/span><span style=\"color: #0000BB\">FALSE<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Return&nbsp;fetched&nbsp;data <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">return&nbsp;<\/span><span style=\"color: #0000BB\">$result<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>}<\/span><\/pre>\n<h2>View (posts\/)<\/h2>\n<p>The <code>posts\/<\/code> folder holds the view files of the Posts controller.<\/p>\n<p><b><code>index.php<\/code><\/b><br \/>\nIn the <code>index.php<\/code> file, the posts data are listed with the pagination links. <\/p>\n<ul class=\"bullet_disk_list\">\n<li>The <b>create_links()<\/b> function of Pagination class generates the pagination links.<\/li>\n<\/ul>\n<pre style=\"color: rgb(95, 94, 78);\"><span class=\"hljs-comment\" style=\"color: rgb(108, 107, 90);\">&lt;!-- Display posts list --&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"post-list\"<\/span>&gt;<\/span>\r\n<span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">if(!empty(<\/span><span style=\"color: #0000BB\">$posts<\/span><span style=\"color: #007700\">)){&nbsp;foreach(<\/span><span style=\"color: #0000BB\">$posts&nbsp;<\/span><span style=\"color: #007700\">as&nbsp;<\/span><span style=\"color: #0000BB\">$row<\/span><span style=\"color: #007700\">){&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>\r\n    <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"list-item\"<\/span>&gt;<\/span><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">a<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"javascript:void(0);\"<\/span>&gt;<\/span><span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">$row<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">\"title\"<\/span><span style=\"color: #007700\">];&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">a<\/span>&gt;<\/span><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span>&gt;<\/span>\r\n<span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">}&nbsp;}else{&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>\r\n    <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">p<\/span>&gt;<\/span>Post(s) not found...<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">p<\/span>&gt;<\/span>\r\n<span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">}&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span>&gt;<\/span>\r\n\r\n<span class=\"hljs-comment\" style=\"color: rgb(108, 107, 90);\">&lt;!-- Render pagination links --&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"pagination\"<\/span>&gt;<\/span>\r\n    <span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">$this<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">pagination<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">create_links<\/span><span style=\"color: #007700\">();&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span>&gt;<\/span><\/pre>\n<h2>Customize the Pagination Links<\/h2>\n<p>The CodeIgniter Pagination class provides various configuration options to customize the pagination links. The link tags customization option is very useful to apply the Bootstrap style for navigation links of CodeIgniter pagination. In the following example, we will show how you can design the <b>CodeIgniter pagination with Bootstrap<\/b> library.<\/p>\n<p><b>Controller:<\/b><br \/>\nSpecify the tags in configuration options for styling the pagination links with Bootstrap.<\/p>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;Pagination&nbsp;link&nbsp;format <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'num_tag_open'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;li&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'num_tag_close'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;\/li&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'cur_tag_open'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;li&nbsp;class=\"active\"&gt;&lt;a&nbsp;href=\"javascript:void(0);\"&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'cur_tag_close'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;\/a&gt;&lt;\/li&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'next_link'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'Next'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'prev_link'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'Prev'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'next_tag_open'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;li&nbsp;class=\"pg-next\"&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'next_tag_close'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;\/li&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'prev_tag_open'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;li&nbsp;class=\"pg-prev\"&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'prev_tag_close'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;\/li&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'first_tag_open'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;li&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'first_tag_close'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;\/li&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'last_tag_open'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;li&gt;'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$config<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'last_tag_close'<\/span><span style=\"color: #007700\">]&nbsp;=&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;\/li&gt;'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>View:<\/b><br \/>\nInclude the Bootstrap library on the web page where the pagination links will render.<\/p>\n<pre style=\"color: rgb(95, 94, 78);\"><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">link<\/span> <span class=\"hljs-attr\">rel<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"stylesheet\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.3.1\/css\/bootstrap.min.css\"<\/span>&gt;<\/span><\/pre>\n<p class=\"seeAlso\"><span><\/span><a href=\"https:\/\/www.codexworld.com\/codeigniter-ajax-pagination-with-search-filter\/\">Ajax Pagination with Search and Filter in CodeIgniter<\/a><\/span><\/p>\n<h2>Conclusion<\/h2>\n<p>CodeIgniter&#8217;s Pagination library is the easiest way to add pagination to the data list and customize the pagination links as per the web page UI. Here we have shown a basic pagination example in CodeIgniter application. You can easily enhance the functionality of this pagination code as per your needs. If you want to make the pagination user-friendly, integrate <a href=\"https:\/\/www.codexworld.com\/ajax-pagination-in-codeigniter-framework\/\">Ajax pagination in CodeIgniter<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pagination is the most required feature in the data list of the web application. Generally, pagination is used when data is retrieved from the database and listed on the web page. The pagination feature is <\/p>\n","protected":false},"author":1,"featured_media":4149,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[55,110],"class_list":["post-2935","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-codeigniter","tag-codeigniter","tag-pagination","cat-8-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pagination in CodeIgniter - CodexWorld<\/title>\n<meta name=\"description\" content=\"CodeIgniter Pagination \u2013 Create and add pagination links to the data list in CodeIgniter. Example code to integrate pagination in CodeIgniter using the Pagination library. Customize pagination with Bootstrap in CodeIgniter.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pagination in CodeIgniter - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"CodeIgniter Pagination \u2013 Create and add pagination links to the data list in CodeIgniter. Example code to integrate pagination in CodeIgniter using the Pagination library. Customize pagination with Bootstrap in CodeIgniter.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-13T19:47:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-05T17:50:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/11\/codeigniter-pagination-class-library-bootstrap-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1366\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Pagination in CodeIgniter\",\"datePublished\":\"2017-11-13T19:47:39+00:00\",\"dateModified\":\"2019-09-05T17:50:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/\"},\"wordCount\":517,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/codeigniter-pagination-class-library-bootstrap-codexworld.png\",\"keywords\":[\"CodeIgniter\",\"Pagination\"],\"articleSection\":[\"CodeIgniter\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/\",\"name\":\"Pagination in CodeIgniter - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/codeigniter-pagination-class-library-bootstrap-codexworld.png\",\"datePublished\":\"2017-11-13T19:47:39+00:00\",\"dateModified\":\"2019-09-05T17:50:18+00:00\",\"description\":\"CodeIgniter Pagination \u2013 Create and add pagination links to the data list in CodeIgniter. Example code to integrate pagination in CodeIgniter using the Pagination library. Customize pagination with Bootstrap in CodeIgniter.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/codeigniter-pagination-class-library-bootstrap-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/codeigniter-pagination-class-library-bootstrap-codexworld.png\",\"width\":1366,\"height\":768,\"caption\":\"codeigniter-pagination-class-library-bootstrap-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/codeigniter-pagination-library-bootstrap\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pagination in CodeIgniter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pagination in CodeIgniter - CodexWorld","description":"CodeIgniter Pagination \u2013 Create and add pagination links to the data list in CodeIgniter. Example code to integrate pagination in CodeIgniter using the Pagination library. Customize pagination with Bootstrap in CodeIgniter.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/","og_locale":"en_US","og_type":"article","og_title":"Pagination in CodeIgniter - CodexWorld","og_description":"CodeIgniter Pagination \u2013 Create and add pagination links to the data list in CodeIgniter. Example code to integrate pagination in CodeIgniter using the Pagination library. Customize pagination with Bootstrap in CodeIgniter.","og_url":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2017-11-13T19:47:39+00:00","article_modified_time":"2019-09-05T17:50:18+00:00","og_image":[{"width":1366,"height":768,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/11\/codeigniter-pagination-class-library-bootstrap-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Pagination in CodeIgniter","datePublished":"2017-11-13T19:47:39+00:00","dateModified":"2019-09-05T17:50:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/"},"wordCount":517,"commentCount":4,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/11\/codeigniter-pagination-class-library-bootstrap-codexworld.png","keywords":["CodeIgniter","Pagination"],"articleSection":["CodeIgniter"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/","url":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/","name":"Pagination in CodeIgniter - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/11\/codeigniter-pagination-class-library-bootstrap-codexworld.png","datePublished":"2017-11-13T19:47:39+00:00","dateModified":"2019-09-05T17:50:18+00:00","description":"CodeIgniter Pagination \u2013 Create and add pagination links to the data list in CodeIgniter. Example code to integrate pagination in CodeIgniter using the Pagination library. Customize pagination with Bootstrap in CodeIgniter.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/11\/codeigniter-pagination-class-library-bootstrap-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/11\/codeigniter-pagination-class-library-bootstrap-codexworld.png","width":1366,"height":768,"caption":"codeigniter-pagination-class-library-bootstrap-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/codeigniter-pagination-library-bootstrap\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Pagination in CodeIgniter"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/11\/codeigniter-pagination-class-library-bootstrap-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-Ll","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=2935"}],"version-history":[{"count":6,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2935\/revisions"}],"predecessor-version":[{"id":4148,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2935\/revisions\/4148"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/4149"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=2935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=2935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=2935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}