PHP Interval Pagination_PHP Tutorial

WBOY
Release: 2016-07-13 17:46:00
Original
925 people have browsed it

Php代码 
function outpage($page_total,$page_no,$page_limit=5) { 
    $page_list = ''; 
 
    $max = $page_no >= $page_limit ? $page_no + $page_limit : 10; 
 
    if ($max > $ps) $max = $ps; 
    $min = $page_no - $page_limit; 
    if ($min < 1) $min = 1; 
    if ($page_no > 1) $page_list .= '首页'; 
    for ($i=$min; $i <= $max; $i++) $page_list .= ('分页HTML'); 
    $page_list .= $page_no >= $page_total ? '' : '尾页'; 

 
调用:
 
Php代码 
echo outpage($page_total,$_GET['page'],6); 

作者“cevin@iteye”
 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478618.htmlTechArticlePhp代码 function outpage($page_total,$page_no,$page_limit=5) { $page_list = ; $max = $page_no = $page_limit ? $page_no + $page_limit : 10; if ($max $ps) $max = $ps; $min = $page_...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!