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('d/m/Y', $date) . "
"; - } + $date = strtotime($row['date']); + echo "

"; + echo ""; + echo "
" . $row['titre'] . "
"; + echo "
" . date('d/m/Y', $date) . "
"; } } ?>