Kier XenForo developer Staff member Sep 23, 2011 #2 There's no break, but you can iterate for a specific count like this: Code: <xen:foreach loop="$array" key="$key" value="$value" i="$i"> <xen:if is="{$i} <= 10"> <div>{$value}</div> </xen:if> </xen:foreach>
There's no break, but you can iterate for a specific count like this: Code: <xen:foreach loop="$array" key="$key" value="$value" i="$i"> <xen:if is="{$i} <= 10"> <div>{$value}</div> </xen:if> </xen:foreach>
xfrocks Well-known member Oct 1, 2011 #4 Kier said: There's no break, but you can iterate for a specific count like this: Code: <xen:foreach loop="$array" key="$key" value="$value" i="$i"> <xen:if is="{$i} <= 10"> <div>{$value}</div> </xen:if> </xen:foreach> Click to expand... TIL <xen:foreach> supports "i"!!!! I have to fix my array_values calls now. Thanks Kier!
Kier said: There's no break, but you can iterate for a specific count like this: Code: <xen:foreach loop="$array" key="$key" value="$value" i="$i"> <xen:if is="{$i} <= 10"> <div>{$value}</div> </xen:if> </xen:foreach> Click to expand... TIL <xen:foreach> supports "i"!!!! I have to fix my array_values calls now. Thanks Kier!
Hoffi Well-known member Oct 1, 2011 #5 You're a good software developer, if you did can program without using break. (Except in switch/case!)
You're a good software developer, if you did can program without using break. (Except in switch/case!)