From 0255d7f942253b5838479ab3503032f3e1984610 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Fri, 8 Mar 2024 15:58:24 +0000 Subject: [PATCH] Update file news.php --- html/news.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/html/news.php b/html/news.php index e6acc813..14b80835 100644 --- a/html/news.php +++ b/html/news.php @@ -75,15 +75,12 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) { $req->execute(); $resultat = $req->fetchAll(PDO::FETCH_ASSOC); - $date = strtotime($row['date']); - if ($resultat) { - foreach($resultat as $row) { - echo "

"; - echo ""; - echo "
" . $row['titre'] . "
"; - echo "
"; - } + $date = strtotime($row['date']); + echo "

"; + echo ""; + echo "
" . $row['titre'] . "
"; + echo "
"; } } ?>