Loops

User Annotations: loops
Scott Shepard : ids at, southbound d0t com
11/09/2016 19:06 p.m.
Note: l.pos maybe shouldn't be used unless explicitly needed. If used as in the examples, and you nest foreach loops without incrementing the index to l.pos2 for example, your loop will never end. y advice here is to leave off the index when initiating the foreach loop and when you nest, the index will increment automatically.
<MvFOREACH ITERATOR = "l.needle1" ARRAY = "l.haystack">
<MvFOREACH ITERATOR = "l.needle2" ARRAY = "l.needle1">
   <MvEVAL EXPR = "{ l.needle2 $ '<br />' }">
</MvFOREACH> 
</MvFOREACH>