Home  >  Article  >  Backend Development  >  PHP paging class code example

PHP paging class code example

怪我咯
怪我咯Original
2017-07-23 11:01:371057browse

Pagination means dividing a page into two or more pages.

There is an automatic paging mechanism that can divide the content in the mobile Web form

into a group of smaller pages for presentation, suitable for specific equipment. This mechanism also renders user interface elements that can be used to navigate to other pages.

The following is a PHP paging code, which is relatively simple.

$pages)$p_end=$pages; //页码循环结束数 后5个 
echo "[首页] "; 
for($i=$p_head;$i<=$p_end;$i++) 
{ 
if($i!=$page) 
echo "[$i] "; 
else 
echo "[$i] "; 
} 
echo " [末页]"; 
} 
?>

The above is the detailed content of PHP paging class code example. For more information, please follow other related articles on the PHP Chinese website!

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