title: DataTable rowReordering issue PHP
body: <p>I've tried retrieve data from database table and show in DataTable, but I'm getting below error </p>
  
  <blockquote>
    <p>DataTables warning: table id=example - Invalid JSON response. For more information about this error, please see <a href="http://datatables.net/tn/1" rel="nofollow noreferrer">http://datatables.net/tn/1</a></p>
  </blockquote>
  
  <p>Could you please saw  me the error in this code ? </p>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$displayBoxList = $this-&gt;category_m-&gt;getCategoryDisplayboxList(null, $type, $page);
  $boxList = array();
  
  foreach($displayBoxList as $key =&gt; $val)
  {
      $status = ($val['isActive'] == 1) ? 'Active' : 'De-active';
  
      // $boxList[] = array($val['ID'],$val['heading'],$val['displayOrder'],$status);
  
      $boxList[$key]['ID'] = $val['ID'];
      $boxList[$key]['heading'] = $val['heading'];
      $boxList[$key]['displayOrder'] = $val['displayOrder'];
      $boxList[$key]['status'] = ($val['isActive'] == 1) ? 'Active' : 'De-active';
  }
  
  $json = json_encode($boxList);
  echo $json;
  </code></pre>
  
  <p><strong>AJAX</strong></p>
  
  <pre><code>&lt;script&gt; 
  $(document).ready(function(){
     var table = $('#example').DataTable({  
  
          "processing": true,
          "serverSide": true,
          "ajax": '&lt;?=site_url()?&gt;category/getDatatableData/&lt;?=$activetab?&gt;',
          "createdRow": function(row, data, dataIndex){
           $(row).attr('id', 'row-' + dataIndex);
          }
  
     });
  
     table.rowReordering();   
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;table id="example" class="display" cellspacing="0" width="100%"&gt;
     &lt;thead&gt;
        &lt;tr&gt;
           &lt;th&gt;ID&lt;/th&gt;
           &lt;th&gt;heading&lt;/th&gt;
           &lt;th&gt;displayOrder&lt;/th&gt;
           &lt;th&gt;status&lt;/th&gt;
        &lt;/tr&gt;
     &lt;/thead&gt;
     &lt;tfoot&gt;
        &lt;tr&gt;
            &lt;th&gt;ID&lt;/th&gt;
           &lt;th&gt;heading&lt;/th&gt;
           &lt;th&gt;displayOrder&lt;/th&gt;
           &lt;th&gt;status&lt;/th&gt;
        &lt;/tr&gt;
     &lt;/tfoot&gt;
  &lt;/table&gt;
  </code></pre>