I am trying to display the data datatables , Tapo there is a problem , please help , for another dicode datatables can run successfully , but in this code do not want the road ? Uncaught TypeError: Cannot read property 'mData' of undefined
This JS
<script src="<?php echo base_url('assets/js/jquery.dataTables.min.js') ?>" type="text/javascript"></script>
<script src="<?php echo base_url('assets/js/dataTables.bootstrap.min.js') ?>" type="text/javascript"></script>
<script>
$(document).ready(function() {
$('#files').DataTable();
});
table class="table table-striped table-condensed" id="files">
<thead>
<tr>
<th>File Name</th>
<th>Upload By</th>
<th>Upload Date</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach($files as $f => $file){
foreach($permission as $p => $key){
if($key['id_files'] == $file['file_id'] ||$this->user->is_teacher || $this->user->is_superadmin ){
echo '<tr>';
echo '<td><a href="'.base_url('dropzone/global_download')."/".$file['file_id'].'">'.$file['file_name'].'</a></td>';
echo '<td>'.$file['upload_by'].'</td>';
echo '<td>'.date("d-M-Y",strtotime($file['upload_dt'])).'</td>';
echo '<td>';
if($this->user->is_teacher || $this->user->is_superadmin){
echo '<a href="'.base_url('dashboard/permission_file')."/".$file['file_id'].'"><i class="fa fa-user"></i> Manage </a>';
echo '</td>';
echo '<td>';
echo '<a href="javascript:_delete_file('.$file['file_id'].');"><i class="fa fa-times"></i> Delete </a>';
}
echo '</td>';
echo '</tr>';
}
}
}
?>
</tbody>
</table>