Paging Using PHP - PHP MySQL Tutorial
The mathematical function ceil() is used to round up the value of $numrows/$rowsPerPage. In this case the value of total rows $numrows is 295 and $rowsPerPage is 20 so the result of the division is 14.75 and by using ceil() we get $maxPage = 15...