Lien de l'index vers l'article
This commit is contained in:
parent
8e09ce2518
commit
a19af0b4d4
10
index.php
10
index.php
|
@ -60,6 +60,8 @@ $articles = array(
|
|||
|
||||
<section>
|
||||
<?php
|
||||
$articleId = 0;
|
||||
|
||||
foreach ($articles as $monArticle) {
|
||||
$titre = $monArticle['titre'];
|
||||
$date = $monArticle['date'];
|
||||
|
@ -67,7 +69,11 @@ $articles = array(
|
|||
|
||||
echo '<article>';
|
||||
echo '<header>';
|
||||
echo '<h2>'.$titre.'</h2>';
|
||||
echo '<h2>';
|
||||
echo '<a href="article.php?article='.$articleId.'">';
|
||||
echo $titre;
|
||||
echo '</a>';
|
||||
echo '</h2>';
|
||||
echo '</header>';
|
||||
|
||||
echo '<div class="date">';
|
||||
|
@ -76,6 +82,8 @@ $articles = array(
|
|||
|
||||
echo $contenu;
|
||||
echo '</article>';
|
||||
|
||||
$articleId++;
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue