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>
|
<section>
|
||||||
<?php
|
<?php
|
||||||
|
$articleId = 0;
|
||||||
|
|
||||||
foreach ($articles as $monArticle) {
|
foreach ($articles as $monArticle) {
|
||||||
$titre = $monArticle['titre'];
|
$titre = $monArticle['titre'];
|
||||||
$date = $monArticle['date'];
|
$date = $monArticle['date'];
|
||||||
|
@ -67,7 +69,11 @@ $articles = array(
|
||||||
|
|
||||||
echo '<article>';
|
echo '<article>';
|
||||||
echo '<header>';
|
echo '<header>';
|
||||||
echo '<h2>'.$titre.'</h2>';
|
echo '<h2>';
|
||||||
|
echo '<a href="article.php?article='.$articleId.'">';
|
||||||
|
echo $titre;
|
||||||
|
echo '</a>';
|
||||||
|
echo '</h2>';
|
||||||
echo '</header>';
|
echo '</header>';
|
||||||
|
|
||||||
echo '<div class="date">';
|
echo '<div class="date">';
|
||||||
|
@ -76,6 +82,8 @@ $articles = array(
|
||||||
|
|
||||||
echo $contenu;
|
echo $contenu;
|
||||||
echo '</article>';
|
echo '</article>';
|
||||||
|
|
||||||
|
$articleId++;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in a new issue