DataTables Example – Server-side Processing with PHP

In previous post Data Table jQuery Plugin, we have learn what is jQuery datatable plugin and how to use jQuery datatable in your application,now in this tutorial i will describe how to use data table with server side scripting.I am using PHP and MySQL to get records from server side.In this tutorial our aim to get data from MySQL with help of php and passed data to jQuery datatable constructor.

Also Checkout other tutorial of Datatable,


There are following steps need to achieve over goal:

Step 1: we will include jquery datatable and jquery library.

Step 2: Create HTML table in your web page.

Step 3: Apply Datatable functionality on our HTML table.

Step 4: Now we will create response.php file and write down below code.

Here we have taken constant array instead of MySQL records, I am assuming you will replace this constant array with your MySQL result set.