1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

foreach loop

Discussion in 'XenForo Development Discussions' started by asma, Aug 19, 2015.

  1. asma

    asma Member

    how do i write this correctly?

    xen:foreach loop=something
    if looping first time
    do this
    do this
  2. Arty

    Arty Well-Known Member

    Judging by xen:foreach, you are talking about template syntax?
    <xen:foreach loop="$something" value="$value" i="$i">
    <xen:if is="{$i} == 0">
    do this
    <xen:else />
    do this
    Marcus and asma like this.
  3. asma

    asma Member

    Thank you! (y)

Share This Page