read out actual iteration of foreach in smarty php? -


I have a problem; I want to run a foreach-loop and items will be created in the loop with the actual recurring number.

My code is so far:

  {= $ builder item = object name = foreach_gallery} {capture assign = shopbill}  ; {/ Capture} & lt; Tr & gt; & Lt; td width = "250" & gt; {$ ShopBild | Max_image_width: 160} & lt; Br / & gt; & Lt; Input type = "text" size = "2" name = "pic_id {$ smarty.foreach.foreach_gallery.iteration}" value = "{$ item- & gt; field.id}" readable & gt; & Lt; / TD & gt; & Lt; TD & gt; {Input type = "text" name = "articlinnem $ smartrri.eu .. etcher_gallery.it" title = "articelbiziecheng:"}   

this

  & lt; Input type = "text" size = "2" name = "pic_id {$ smarty .foreach.foreach_gallery.iteration}" value = "{$ item-> field.id}" readable & gt;   

Element but {input ...} does not have any idea why this does not work in another case and how can I solve this problem ?

Grise Sebastian

You can try:

  & lt; input type = "text" name = "articlename {$ smarty.foreach.foreach_gallery.iteration}" title = "Artikelbezeichnung:" & gt; Instead of   

:

  {input type = "text" name = "articlenam $ smarty.foreach.foreach_gallery.iteration" title = "Artikelbezeichnung:" }   

Hope I help you

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -