我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何显示限制器5的分页?

I have huge results and paginated according to the results.

$total_records = 156;
$limit = 20;
$total = ceil($total_records/$limit);
<previous>
for($i=1;$i<$total;$i++){
$paging .= <li>$i</li>;
}
<next>

outputs

1 2 3 ... 32 pages.

How to control the pagiantion handling if the user select 5 per limit and show the pages

1 2 3 5 6 7 8 next 9 10 11 12 13 14 15 next 15 16 32 next

近期文章

  • webprofiler没有在干净的symfony4项目上工作
  • 年级(begin_date)laravel中的未知列
  • 在同一页面上显示条纹模式,而不是在“https://checkout.stripe.com/v3/...”中显示模式
  • 我的page.php有问题
  • 如何通过guzzle运行cURL
  • 我登录两次时只设置$ _SESSION
  • Phpmailer发送带有表单错误的邮件
  • Mysql变量返回null值
  • Yii2:添加SSL证书时会话缓存问题
  • wordpress致命错误:允许的内存大小(奇怪)
  • jQuery bootgrid:将PHP变量传递给AJAX
  • Php - 没有使用PDO更新mysql中的行
  • d3.json没有从我的php api返回数据值
  • 如何在php中动态获取特定的行数据
  • 如何将Wordpress帖子中的链接重定向到子目录?
  • PHP POST方法没有从ajax POST接收数据
  • 如何在URL中使用带有#标签的GET方法?
  • 如何使用php / laravel从wordpress主题识别外部javascript,破碎的图像和css文件
  • 当我从$ _SERVER获取头字段时,我应该使用trim()吗?
  • 表格数据未使用laravel 5.4版本提交到数据库中

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华