As your database grows, showing all the results of a query
on a single page is no longer practical that’s why pagination is used in PHP.
You can display your results over a number of pages, each linked to the next, and
to allow your users to browse your content in bite sized pieces.
/* We will
bypass the database connection code ... */
// select all
data from your table
"select count(*) from tempdatabase.tbltemp";
result of query
'mode' => 'Sliding',
'perPage' => 10,
'delta' => 4,
// return the
links of pages
The above code will return the following pagination links.
1 | 2 | 3 | 4 | 5 | 6
| 7 | 8 | 9 » 
Assuming the page where the above code is included is named
‘MydataPage.php’; the pager links will have a url like follows:
Where n is the page number.