<?php

include ('../../layouts/config.php');

$getClients = mysqli_query($link, "SELECT * FROM `clients`");
    
$emparray = array();


while($row =mysqli_fetch_assoc($getClients))
{
    $f_row=array();
    $id = $row['id'];
    $matricule = $row['matricule'];
    $prenom = $row['prenom'];
    $nom = $row['nom'];
    $telephone = $row['telephone'];
    $date_c = date('d/m/Y', strtotime($row['date_c']));

    $f_row[] = $id;
    $f_row[] = $matricule;
    $f_row[] = $prenom;
    $f_row[] = $telephone;
    $f_row[] = $date_c;

    $emparray[] = $f_row;
}

echo json_encode($emparray);


?>