Tag "Bootstrap" (2)
To make your bootstrap pagination centered on the page for bootstrap 2.x you easily add "pagination-centered" class. However for bootstrap 3 there is no such class name to center it on page. To center it just add a wrapper
Simple PHP pagination uses a Twitter Bootstrap layout ... Reveal Code
- $targetpage = "search.php";
- $limit = 50; //Records per page
- $total_pages = $total_count; //Total number of the records to paginate
-
- $stages = 3;
- $page = mysql_escape_string($_REQUEST['page']);
- if ($page) {
- $start = ($page - 1) * $limit;
- } else {
- $start = 0;
- }
- if ($page == 0) {
- $page = 1;
- }
- $prev = $page - 1;
- $next = $page + 1;
- $lastpage = ceil($total_pages / $limit);
- $LastPagem1 = $lastpage - 1;
-
- $paginate = '';
- if ($lastpage > 1) {
-
- $paginate .= "
- ";
- }
- echo $paginate;