Lien de la librairie: https://datatables.net/
Voici le code =qui permet de faire fonctionné mon tableau ( Design ect...)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<script type="text/javascript">
			$(document).ready(function() {
			    let example = $('#example').DataTable( {
			        columnDefs: [ {
			            orderable: false,
			            className: 'select-checkbox',
			            targets:   0
			        } ],
			        select: {
			            style:    'os',
			            selector: 'td:first-child'
			        },
			        order: [[ 1, 'asc' ]]
			    } );
			} );
			example.on("click", "th.select-checkbox", function() {
			    if ($("th.select-checkbox").hasClass("selected")) {
			        example.rows().deselect();
			        $("th.select-checkbox").removeClass("selected");
			    } else {
			        example.rows().select();
			        $("th.select-checkbox").addClass("selected");
			    }
			}).on("select deselect", function() {
			    ("Some selection or deselection going on")
			    if (example.rows({
			            selected: true
			        }).count() !== example.rows().count()) {
			        $("th.select-checkbox").removeClass("selected");
			    } else {
			        $("th.select-checkbox").addClass("selected");
			    }
			});
 
			var checkboxes = document.getElementById("example").getElementsByTagName("input");
			var $checkboxes= $(':checked')
		</script>
Et voici mon code pour la table:
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<table id="example" class="display" width="100%" cellspacing="0">
	        <thead>
	            <tr>
			        <th></th> // Ici est censé inséré une checkbox ( Mais ne le fait pas)
		                <th>Id</th>
			        <th>Nom</th>
			        <th>Prénom</th>
	            </tr>
	        </thead>
	        <tbody>
			        <?php
                                        while($p = $personnesv->fetch())
                                        {?>
					<tr>
			             	    <td></td> // Ici le JS insère une checkbox
					    <td><?php echo $p['id']; ?></td>
					    <td><?php echo $p['nom']; ?></td>
				            <td><?php echo $p['prenom']; ?></td>
					</tr>
				        <?php }
                                ?>
	                            </tbody>
	                       </table>
Je voudrais pouvoir récupéré les checkbox "CHECK" dans une variable JS pour pouvoir les récupéré en php et stocké toute les id des case check dans une seul ariable php pour m'en servire plus tard.