DataTable using PHP(使用 PHP 的数据表)
问题描述
是否可以使用 PHP 编写数据表?
Is it possible to code a DataTable using PHP?
当在线搜索所有教程等都使用 ajax 时,我不太适应,所以只是想知道是否有一种方法可以只使用 PHP 来编写数据表 &如果是这样,有人有链接让我浏览吗?
When searching online all tutorials etc are using ajax, which I'm not to comfortable with so just wondering if there is a way of just using PHP to code a datatable & if so does anyone have a link for me to look through?
谢谢
推荐答案
尽管我完全同意您问题下方的评论!作为一种快速解决方法(没有学习曲线!)如果您的表格包含少于 10.000 行,您可以像您一样在 for
/while
循环中简单地生成一个简单的 HTML 表格对于一个简单的表.然后像这样将表的 ID 传递给数据表:
Even though I totally agree with comments below your question! as a quick workaround (with no learning curve!) if your tables contain less than 10.000 rows you may simply generate a simple HTML table in a for
/ while
loop as you would for a simple table. Then pass your table's ID to datatable like this:
$(document).ready(function() {
$('#example').DataTable();
});
但毕竟,AJAX 的创建是为了让世界对我们更美好.:-)
But after all, AJAX is created to make world a better place for us. :-)
这篇关于使用 PHP 的数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 PHP 的数据表


- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- PHP - if 语句中的倒序 2021-01-01