The newly written paging function. The new paging function solution was intended to find a paging function or class. as a result, it was easy to use it after searching for a long time on the Internet. it took me 10 minutes to get a page. simple paging function
Solution
I used to find a paging function or a class. as a result, I found it easy to use online for a long time. it took me 10 minutes to get a page. it's easy to comment on .... (Later, I saw something similar to google and Baidu ....) /* paging functions
$ Num: total number of articles
$ P: current page number
$ Q: The content of the current search
$ Str: url parameter (what follows the question mark)
$ Pn: Number of Entries displayed per page
{Fl ($ num, $ p, $ q, $ pn )}
*/
Function fy ($ num, $ p, $ str = '? Mod = zzwla & dosubmit = 1', $ q = '', $ pn = 10)
{
If (empty ($ num) return false;
$ Ps = ceil ($ num/$ pn );
$ Q = $ q? '& Q ='. urlencode ($ q ):'';
If ($ p> 1)
Echo 'previous page ';
If ($ ps <15)
For ($ I = 1; $ I <15; ++ $ I)
{
If ($ I <= $ ps)
Echo ''. $ I.'') :( 'page "> '. $ I .'')).'';
}
Else
For ($ I = $ p7; $ I <$ p + 7; ++ $ I)
{
If ($ I> 0 & $ I <= $ ps)
Echo ''. $ I.'') :( 'page "> '. $ I .'')).'';
}
If ($ p! = $ Ps)
Echo 'next page ';
}
Below is, haha
[]
Attachment: you cannot download or view attachments in your user group.
D8888D reply content
Look at the paging class written by old ghost
[Url = http://bbs.phpchina.com/viewthread.php? Tid = 29479 & highlight = % B7 % D6 % D2 % B3] link tag http://bbs.phpchina.com/viewthre... hlight = % B7 % D6 % D2 % B3 [/url]
D8888D reply content
Read it. it's a long character.
You can quickly implement the function.
D8888D reply content
I use the <> icon in the editor. during preview, only one [CODE] tag is added to both ends of the CODE.
D8888D reply content
Thank you!
D8888D reply content
Thank you for sharing @!
D8888D reply content
Used
Pai_^
[Img] http://www.phpchina.com/bbs/images/smilies/default/lol.gif#/img]
The seek solution was intended to find a paging function or class. as a result, it was easy to use it after searching for a long time on the internet. it took me 10 minutes to get a page. it was very simple...