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

how to do WHILE if while is not available ?

 
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
sarahfoxnz
Smarty Regular


Joined: 11 Apr 2010
Posts: 76

PostPosted: Sat Feb 10, 2018 12:25 am    Post subject: how to do WHILE if while is not available ? Reply with quote

Smarty: 2.6.26

I'm wanting a counter, and loop until it reaches a number, increasing by 1 each time.

unfortunately, the WHILE command is not working / not available to me.

any suggestions ?

$x = 1

(do while)
$x++

if $x > 20 - End routine & go to the next part of the smarty template
(just basic / example code - not exact code i know)
Back to top
View user's profile Send private message
sarahfoxnz
Smarty Regular


Joined: 11 Apr 2010
Posts: 76

PostPosted: Sat Feb 10, 2018 4:14 am    Post subject: Reply with quote

Ive fixed it within PHP itself (creating a text file with the OPTIONS (select field in a form) and use Smarty to just quote/print the text in the right place.
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