DataTable using PHP

前端 未结 2 1458
说谎
说谎 2021-01-16 05:09

Is it possible to code a DataTable using PHP?

When searching online all tutorials etc are using ajax, which I\'m not to comfortable with so just wondering if there

2条回答
  •  我在风中等你
    2021-01-16 05:49

    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();
    });
    

    But after all, AJAX is created to make world a better place for us. :-)

提交回复
热议问题