From 5818fb47aa9158d5b4f1417ec9e96393a1a29d89 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Thu, 7 Mar 2024 02:53:30 +0000 Subject: [PATCH] Update file journal.php --- html/journal.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html/journal.php b/html/journal.php index bed06fae..749ab5ac 100644 --- a/html/journal.php +++ b/html/journal.php @@ -57,9 +57,11 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); + $date = new Datetime($row['date']) + if ($resultat) { foreach($resultat as $row) { - echo "

" . $row['titre'] . "

" . $row['auteur'] . "
" . $row['date']->format('d/m/Y') . "
"; + echo "

" . $row['titre'] . "

" . $row['auteur'] . "
" . $date->format('d/m/Y') . "
"; } } }