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

Smarty 2 reset counter in foreach

 
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 -> General
View previous topic :: View next topic  
Author Message
Trax3r
Smarty n00b


Joined: 03 Mar 2014
Posts: 3

PostPosted: Thu Apr 10, 2014 9:11 am    Post subject: Smarty 2 reset counter in foreach Reply with quote

Hello everyone!

I have a question about the counter.

Is it possible to reset the counter after iteration in a foreach loop ?
so that he is counting again by zero.

sorry for my bad English.

Greez Francois
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Thu Apr 10, 2014 10:24 am    Post subject: Reply with quote

Code:
{counter start=1}

for the first call within the {foreach} loop.
Back to top
View user's profile Send private message
Trax3r
Smarty n00b


Joined: 03 Mar 2014
Posts: 3

PostPosted: Fri Apr 11, 2014 7:11 am    Post subject: closed Reply with quote

Thank you ,

it work

Surprised
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 -> General 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