PHP FCK article pagination fckeditor article page code
<?php
$page =isset ($_get[' page ')? $_get[' Page ']:1;//here. Pagination number of the current article if not, 1.
$split = ' <div style= "page-break-after:always" ><span style= "Display:none" > </span></ Div> ';
Here is the pagination code for the FCKeditor article
$array =explode ($split, $rs->new_content);
if ($page >sizeof ($array)) {//To determine whether the paging number obtained from the address bar is greater than the length of the total page and, if so, to output the contents of the first page
echo $array [0];
}else{
echo $array [$page -1];//not output $page-1 here because the subscript for PHP functions starts at 0.
}
if (sizeof ($array) >1) {//here is to determine if the article does not page pagination does not show the nth page,
for ($i =1; $i <=sizeof ($array); $i + +) {
echo "<a href=?id= $type _id&page=". $i. " >[". $i." Page]</a> ";
}
}
?>
Original article: Www.111cn.net reprint Please specify