1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<?php
$nbre_max_tour = 5; //limite à 5 tours
$compteur_tour = 0; //compteur de tours
$first_news = 1;
foreach ($content['n'] as $news_content) {
if ($first_news != 1) echo "<div class=\"news-sep\"></div>";
$first_news = 0;
if($compteur_tour == $nbre_max_tour)
{
$compteur_tour = 0;
break;
}
?>
<div class="news-bloc">
<a href="news" title="<?php echo $news_content['title']; ?>"><img src="images/index/<?php echo $news_content['img_index']; ?>" width="88px" height="120px" alt="<?php echo $news_content['title']; ?>" /></a>
<h3><span><?php echo datefr("m/Y", $news_content['date']); ?> - </span><a href="news" title="<?php echo $news_content['title'] ?>"><?php echo $news_content['title']; ?></a></h3>
<p><a href="news" title="<?php echo $news_content['title']; ?>"><?php echo $news_content['subtitle']; ?></a></p>
<div class="clear"></div>
</div>
<?php $compteur_tour ++; } ?> |
Partager