Using an HTML table with DataTable and a database
CodeIgniter comes with a useful library to handle HTML tables. It's simple to use and is able to handle most of the things you would need it for. Here, in this recipe, we're going to use it with DataTable to create an interactive HTML table that is sortable and searchable. It even has pagination! This recipe populates the table using a database query. If you're not looking for that and just want a simple table, try the preceding recipe—Using an HTML table with DataTable.
For this recipe, you will have to:
- Ensure that you've downloaded DataTable from https://datatables.net/download/.
- Unzip the downloaded
.zipfile, and move the files to a location on your web server or localhost, which ...