echo "No rows returned."; exit; } else { /* Calculate number of pages. */ $numOfPages = ceil($rowsReturned / $rowsPerPage); } /* Echo results to the page */ $pageNum = isset($_GET['pageNum']) ? $_GET['pageNum'] : 1; $page = Pagination::getPage($stmt, $pageNum, $rowsPerPage); foreach ($page as $row) { $studentPageLink = "ViewStudent/?studentID={$row['3']}"; echo "<tr><td>{$row['0']}</td><td>{$row['1']}</td><td>{$row['2']}</td><td><a href='{$studentPageLink}'>Student's Page</a></td><td>{$row['4']}</td></tr>"; } echo "</tbody></table><br />"; $modulator = 4; Pagination::pageLinks($numOfPages, $pageNum, $rowsPerPage, $rowsReturned, $modulator); ?> </div> </div> </div> </div> </div> </div> </div> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="/js/bootstrap.min.js"></script> <script>