Home >
Article > Backend Development > PHP long article paging function with usage method, paragraphs will not be divided, pages will be turned at the bottom_PHP tutorial
PHP long article paging function with usage method, paragraphs will not be divided, pages will be turned at the bottom_PHP tutorial
WBOYOriginal
2016-07-21 15:43:211140browse
Copy code The code is as follows:
{ global $expert_id; $PageLength = 2000; //Number of words per page $CLength = strlen($content); $PageCount = floor(($CLength / $PageLength)) + 1; //Calculation Number of pages $PageArray=array(); $Seperator = array("n","r",".","!","?",";",",","" ","'"); //delimiter
if($page<$PageCount) echo " next page "; else echo " next page";
echo "
"; } }
}?>
Use
to copy the code The code is as follows:
$content1=''Test text, try to be as long as possible, www.jb51.net"; $current=$_REQUEST['page_t']; $result=ff_page($content1,$current); echo $result; ?>
http://www.bkjia.com/PHPjc/320767.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320767.htmlTechArticleCopy the code as follows: ?php function ff_page($content,$page) { global $expert_id; $PageLength = 2000; //Number of words per page $CLength = strlen($content); $PageCount = floor(($CLength /...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn