1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| <div class="thearticles">
<?php
$reponse = $bdd->query('SELECT * FROM blog_article');
while ($donnees = $reponse->fetch()) {
?>
<article>
<div class="article-title">
<h3><?php echo $donnees['titre']; ?></h3>
</div>
<span class="article-category">
<i class="fa fa-tag fa-rotate-90" aria-hidden="true"></i>
<?php
$idcat=$donnees['id_categorie'];
$categ = $bdd->query("SELECT * FROM blog_categorie WHERE id = $idcat");
while ($cat = $categ->fetch()) {
echo $cat['label'];
}
?>
</span>
<hr>
<div class="article-content">
<span class="article-post">Posté le <?php echo $donnees['date_creation']; ?></span>
<p><?php echo $donnees['contenu']; ?></p>
<?php
$idArticle = $donnees['id'];
?>
<a href="article.php?page=<?php echo $idArticle; ?>" class="article-suite">Lire la suite ...</a>
</div>
<div class="article-img">
<img src="<?php echo $donnees['url_img']; ?>" />
</div>
<span class="article-share-item"> Partager</span>
</article>
<?php
}
$reponse->closeCursor();
?> |
Partager