Customize the PHP paging function. Every time you write a list page, you need to write a paging program. Recently, Xiaoyang was finally determined to define a paging function once and for all, and saved it in "pageft. ph. every time he wrote a list page, he almost had to write a paging program. Recently, Xiaoyang was determined to create a paging function and save it in the "pageft. php" file. To use paging, you can directly include the "pageft. php" file and call this function. When writing this function, Xiaoyang tries to pay attention to the portability and ease-of-use of the program. below is the function compiled by Xiaoyang:
Well, the paging function has been written and saved as "pageft. php". it is included in the paging function and the pageft () function is called. However, it does not output anything, but generates several global variables: $ firstcount, $ displaypg, and $ pagenav.
The following is an example of its usage:
That is, the effect displayed in the navigation bar format:
Bytes. Recently, Xiaoyang finally decided to create a paging function and save it in "pageft. ph...