72 lines
1.8 KiB
PHP
Executable File
72 lines
1.8 KiB
PHP
Executable File
<style>
|
|
.table th,
|
|
.table td {
|
|
padding: 8px;
|
|
}
|
|
|
|
table.dataTable tbody td {
|
|
padding: 4px 4px !important;
|
|
}
|
|
</style>
|
|
|
|
|
|
<div class="responsive-table-plugin">
|
|
<div class="table-rep-plugin">
|
|
<div class="table-responsive" data-pattern="priority-columns">
|
|
<table id="tech-companies-1" class="table table-striped">
|
|
|
|
<thead class="bg-light">
|
|
<?php foreach ($thead as $header): ?>
|
|
<th><?php echo $header; ?></th>
|
|
<?php endforeach; ?>
|
|
</thead>
|
|
|
|
<tbody class="font-12">
|
|
<?php for ($i = 1; $i <= $count; $i++): ?>
|
|
<tr>
|
|
<?php foreach ($tbody[$i] as $data): ?>
|
|
<td>
|
|
<?php echo $data;?>
|
|
</td>
|
|
<?php endforeach; ?>
|
|
</tr>
|
|
<?php endfor; ?>
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- end .table-responsive -->
|
|
|
|
</div> <!-- end .table-rep-plugin-->
|
|
</div> <!-- end .responsive-table-plugin-->
|
|
|
|
|
|
<script>
|
|
|
|
$('#tech-companies-1').DataTable({
|
|
// Enable sorting
|
|
"ordering": true,
|
|
|
|
// Enable filtering/search
|
|
"searching": true,
|
|
|
|
// Enable pagination
|
|
"paging": true,
|
|
|
|
// Set the number of records per page
|
|
"pageLength": 10, // Adjust as needed
|
|
|
|
// Define the initial sorting order (optional)
|
|
"order": [[ 0, "asc" ]], // Sort by the first column in ascending order
|
|
|
|
// Customization for the pagination buttons (optional)
|
|
"language": {
|
|
"paginate": {
|
|
"first": "First",
|
|
"last": "Last",
|
|
"next": "Next",
|
|
"previous": "Previous"
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
</script>
|