Deux boucles imbriqués
Posté : 21 mars 2012, 16:25
Le bien bonjour à tout, mon problème et le suivant
le truc bisard c'est une boucle spip qui affiche tout les événements, y a une condition pour remettre $iEvent à 0 quand il atteint 3, ce que je veux c'est incrémenté $nb_col quand $iEvent == 3 ?
Je vous remercie d'avance
<div class="col<?php echo ++$nb_col;?>">
<BOUCLE_agenda_evnmts(EVENEMENTS){par date}{agendafull date_debut,date_fin, mois, #ENV{annee}, #ENV{mois}} >
<div class="event-area<?php echo $iEvnt;?>">
<strong class="title"><a href="#URL_ARTICLE">#TITRE</a></strong></br>
[<em class="date">(#DATE_DEBUT|Agenda_affdate_debut_fin{#DATE_FIN,#HORAIRE})</em>]
<p>#LIEU</p>
<?php
$iEvnt++;
if ($iEvnt == 3){
$iEvnt =0;
}
?>
</div>
</BOUCLE_agenda_evnmts>
</div>
Alors Je vous remercie d'avance