What does the php paging class code look like
This article mainly introduces what the php paging class code is like, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
This is a simple, convenient and fully functional paging category. You can change the CSS style file to control the paging color according to your needs. Using php paging class, you can save yourself a lot of time. You only need to embed it in the paging area. Here's how to use it:
1, including pager.css in head
The code is as follows:
2, instantiate the class at the page:
The code is as follows:
3. Reading mysql database and paging calculation files need to be written by yourself. For example:
$info=mysql_query ("select * from member order by id desc limit $offset,$info_num"); this can be transferred to the mysql database, the current page number, and so on.
Here are three files: (1) index.php: call the paging class to display the paging (2) pager.class.php:php paging class (3) pager.css:css style beautification file
(1) index.php:
The code is as follows:
-pagination presentation-
(2) pager.class.php:
The code is as follows: