Affichage des commentaires d'un article
This commit is contained in:
parent
aa521f42f7
commit
5ba6723d2e
39
article.php
39
article.php
|
@ -80,9 +80,6 @@ $articles = array(
|
||||||
$articleAAfficher = $_GET['article'];
|
$articleAAfficher = $_GET['article'];
|
||||||
$article = $articles[$articleAAfficher];
|
$article = $articles[$articleAAfficher];
|
||||||
|
|
||||||
echo '<pre>', var_dump($article), '</pre>';
|
|
||||||
die;
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
@ -118,34 +115,16 @@ die;
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div class="commentaire">
|
<?php
|
||||||
<h3>Simon Vieille</h3>
|
$commentaires = $article['commentaires'];
|
||||||
|
|
||||||
<p>
|
foreach ($commentaires as $monCommentaire) {
|
||||||
Ton site est assez laid mon pote.
|
echo '<div class="commentaire">';
|
||||||
</p>
|
echo '<h3>'.$monCommentaire['nom'].'</h3>';
|
||||||
</div>
|
echo '<p>'.$monCommentaire['contenu'].'</p>';
|
||||||
<div class="commentaire">
|
echo '</div>';
|
||||||
<h3>Simon Vieille</h3>
|
}
|
||||||
|
?>
|
||||||
<p>
|
|
||||||
Ton site est assez laid mon pote.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="commentaire">
|
|
||||||
<h3>Simon Vieille</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Ton site est assez laid mon pote.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="commentaire">
|
|
||||||
<h3>Simon Vieille</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Ton site est assez laid mon pote.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Laisser une commentaire</h3>
|
<h3>Laisser une commentaire</h3>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue