I am in a cycle to display products ...
4 per line, unlimited lines
I need to know if this is the nth record ... an example every 4 elements ... Therefore, I know its first column, as in paragraph 1, paragraph 5, paragraph 9, etc. .... Or the last element of paragraph 4 paragraph 8 paragraph 12
Tried these where
{foreach from=$sproducts item="product" name="sproducts"}
{counter assign="bobis" name="bobis" }
{if $bobis is div by 4|| $laster ==1}
{if $bobis mod 4 == 0}
{if $bobis !=4 && $bobis !=8 && $bobis != 12}
Any easy way?
source
share