Fonction pour la conversion du tableau en markdown
function array_to_markdown(array $data): string
{
$markdown = "";
$markdown .= 'Il y a ' . $data['count'] . ' lignes différente(s) entre Serge et Test';
$markdown .= "\n\n";
$markdown .= "| Objet | Rôle | Statut | droit sur Serge | droit sur Test | Différence |Type de détail|\n";
$markdown .= "|:---------|:---------|:---------:|:-------------:|:-------------:|:-------------|:-------------|\n";
foreach ($data['table'] as $item) {
foreach ($item as $value) {
$markdown .= " $value |";
}
// ... (truncated)