Bước 1 Chèn CSS PHP Code: <style> .pagination{ padding: 2px; } .pagination ul{ margin: 0; padding: 0; text- align: left; /*Set to "right" to right align pagination interface*/ font-size: 12px; } .pagination li{ list-style-type: none; display: inline; padding-bottom: 1px; } .pagination a, .pagination a:visited{ padding: 0 5px; border: 1px solid #9aafe5; text-decoration: none; color: #2e6ab1; } .pagination a:hover, .pagination a:active{ border: 1px solid #2b66a5; color: #000; background-color: lightyellow; } .pagination li.currentpage{ font-weight: bold; padding: 0 5px; border: 1px solid navy; background-color: #2e6ab1; color: #FFF; } .pagination li.disablepage{ padding: 0 5px; border: 1px solid #929292; color: #929292; } .pagination li.nextpage{ font-weight: bold; } * html .pagination li.currentpage, * html .pagination li.disablepage{ /*IE 6 and below. Adjust non linked LIs slightly to account for bugs */ margin-right: 5px; padding-right: 0; } </style> Bước 2: Tạo 1 recordset Bước 3: Layout 1 table gồm 2 d òng 1 cột .Dòng đầu kéo thả dữ liệu và lặp Demo Code: <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <?php do { ?> <tr> <td><p><?php echo $row_Recordset1['TieuDe']; ?></p> <p><?php echo $row_Recordset1['TomTat']; ?></p></td> </tr> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> <tr> <td> </td> </tr> </table> Click this bar to view the small image. Click this bar to view the small image. Code sau khi chèn xong Code: <div class="pagination"> <ul> <?php for ($i=0; $i <= $totalPages_Recordset1; $i++) { $TFM_PagesEndCount = $i + 1; if($i != $pageNum_Recordset1) { printf('<a href="'."%s?pageNum_Recordset1=%d%s", $currentPage, $i, $queryString_Recordset1.'">'.$TFM_PagesEndCount."</a>"); }else{ echo("<li>$TFM_PagesEndCount</li>"); } if($i != $totalPages_Recordset1) echo(" "); } ?> </ul> </div> F12 Xem thử kết quả Click this bar to view the small image. . Bước 1 Chèn CSS PHP Code: <style> .pagination{ padding: 2px; } .pagination ul{ margin: 0; padding: 0; text- align: left; /*Set. right align pagination interface*/ font-size: 12 px; } .pagination li{ list-style-type: none; display: inline; padding-bottom: 1px; } .pagination a, .pagination