How to create a filter for table in php page

0

I have a php page which contains a table in which it shows several values.

What I am looking to do is to filter by header. In other words, every time you click on a header, all the contents of this column will be filtered to show me the filtered information.

I have seen several examples using javaScript but nothing works for me.

Could you advise me something?

Here is my code from the table:

<table>
    <thead>
        <tr>
            <th>ID</th>
            <th>Subject</th>
            <th>Request</th>
        </tr>
    </thead>
<tbody>
<?php   
    echo '<tr>';
        echo "<td>123456</td>";
        echo "<td>test1</td>";
        echo "<td>user1</td>";
    }
?>
    </tbody>
</table>
    
asked by A arancibia 24.11.2016 в 18:28
source

0 answers