Ec (2); & nbsp; phpfck Article paging fckeditor Article paging code & lt ;? Php & nbsp; $ page & nbsp; isset ($ _ GET [page])? $ _ GET [page]: 1; // the page number of the current article is obtained here. If no page number exists, it is 1 & nbsp; $ split & nbsp; & lt; divstyle & quot; pa script ec (2); script
PhpFck Article paging fckeditor Article paging code
$ Page = isset ($ _ GET ['page'])? $ _ GET ['page']: 1; // the page number of the current article is obtained here. If not, it is 1.
$ Split ='
';
// Here is the paging code of the fckeditor article
$ Array = explode ($ split, $ rs-> new_content );
If ($ page> sizeof ($ array) {// determines whether the page number obtained from the address bar is greater than the total page length. if yes, the first page is output.
Echo $ array [0];
} Else {
Echo $ array [$ page-1]; // if it is not, $ page-1 is output. Here, the subscript of the php function starts from 0.
}
If (sizeof ($ array)> 1) {// It indicates that page N is not displayed if the article has no pages,
For ($ I = 1; $ I <= sizeof ($ array); $ I ++ ){
Echo "[". $ I. "Page]";
}
}
?>
Original article: www.111cn.net reprinted please note