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') . "
"; } } }