Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Boucle for avec 2 conditions

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
1695
Smarty Rookie


Joined: 17 Jun 2008
Posts: 6

PostPosted: Tue Sep 20, 2011 3:07 pm    Post subject: Boucle for avec 2 conditions Reply with quote

Hi,

J'ai besoin d'aide pour "convertir" du code PHP dans la syntaxte smarty.

Voici le code PHP :
Code:

for($i = 1; $i <= count($calendar); $i++){
    echo('<tr>');
    for($j = 1; $j <= 7 && $j-$monthInfos['firstday']+1+(($i*7)-7) <= $monthInfos['nbdays']; $j++){
        // du code
    }
    echo('</tr>');
}


Le premier "for" est facile à "convertir". Mais comme le second a deux conditions, je ne sais pas le mettre en syntaxe smarty.

[code]
{section name="ROW" loop=$COUNT_CAL start=1}
<tr>
{section ???}
{/section}
</tr>
{/section}

Merci d'avance.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP