Home >php教程 >php手册 >如何分页设置页码:php 循环分页的页码数

如何分页设置页码:php 循环分页的页码数

WBOY
WBOYOriginal
2016-06-21 08:50:031802browse

$page = 1;
$total = 20;
$prevs = $page - 4;
if($prevs $prevs = 1;
}
$next = $page + 4;
if($next > $total) {
$next = $total;
}
for($i = $prevs; $i echo $i."\r\n";
}
echo '['.$page.']'."\r\n";
for($i = $page + 1; $i echo $i."\r\n";
} 本文链接http://www.cxybl.com/html/wlbc/Php/20130504/37473.html



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