-1
good afternoon, anyone has any idea why this foreach does not rotate 3 times, and wheel only 1?
  {foreach from=$pag item=pg}
     <div class="fotos-flex active">      
        {foreach from=$photos item=p}
           <div class="fotos-item">
              <img src="img/galeria/1-EXCHANGEDEVELOPMENTPROGRAM- 
               GROUP-  
               2016.JPG">
              <p>Exchange Development Program Group - 2016</p>
          </div>
        {/foreach}
     </div>
  {/foreach} 
						
And why would it run three times?
– Woss
from=$pag, where $pag = 3.
– Arthur Luiz
put the image code disturb the understanding. it seems that yours is beginning with the value of 3, it is not that?
– novic
the initial value is 0 and should go up to 3. as well as the other foreach where $photos = 13, but it runs normally at 13 times.
– Arthur Luiz
@Virgilionovic code added in question.
– Arthur Luiz
The value of
fromshouldn’t it be an eternal object? It seems to me that it makes no sense to pass a number (but I never used Smarty)– Woss
https://www.smarty.net/docsv2/pt_BR/language.function.foreach.tpl I was reading here ... if you’ve seen it before
– novic