如何分页设置页码:php 循环分页的页码数
程序员文章站
2022-04-07 09:32:05
...
$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
$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
下一篇: php显示遇到乱码数据库是mysql