Answer the question
In order to leave comments, you need to log in
How to make a counter on Smarty?
There is a task. Pull records from the database and display them in order through smarti.
With {foreach} understood. There is one BUT - you need to display a maximum of 4 records at a time.
About:
- первый
-1
-2
-3
-4
- второй
-5
-6
-7
-8
...
Answer the question
In order to leave comments, you need to log in
Look towards @iteration. Now smarty is not at hand, but as far as I remember, I did a similar task like this www.smarty.net/docs/en/language.function.foreach.t...
stackoverflow.com/questions/8674831/how-do-you-inc...
{assign var=val value=1}
{assign var=val value=$val+1}
{$val} // Will be 2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question