I'm trying to sort a table that is in PhP and that pulls the data from the database, I tried with js called sorttable, but it did not work, the table is with that code:
echo '<table class="sortable">';
echo "<tr><th>Empresa</th><th>Atividade</th><th>Telefone</th><th>Licença</th><th>Contato</th><th>#</th></tr>";
while ($row_empresas = mysqli_fetch_assoc($resultado_empresas)){
echo '<tr>';
echo '<td>' . $row_empresas['nomeCliente'] . '</td>';
echo '<td>' . $row_empresas['documento'] . '</td>';
echo '<td>' . $row_empresas['telefone'] . '</td>';
echo '<td>' . $row_empresas['cidade'] . '</td>';
echo '<td>' . $row_empresas['email'] . '</td>';
echo '<td>';
echo '<a href="'.base_url().'index.php/base2/visualizar/'.$row_empresas['idClientes'].'" style="margin-right: 1%" class="btn tip-top" title="Ver mais detalhes"><i class="icon-eye-open"></i></a>';
echo '<a href="'.base_url().'index.php/base2/editar/'.$row_empresas['idClientes'].'" style="margin-right: 1%" class="btn btn-info tip-top" title="Editar Cliente"><i class="icon-pencil icon-white"></i></a>';
echo '</td>';
echo '</tr>';
}
echo '</table>';
How could I arrange it so that it could be sorted?