Structures (Version: 1) - Miva - Snippets
<mvt:assign name="l.settings:example:foo" value="'bar'" /> <mvt:assign name="l.settings:example:bar" value="'baz'" /> &mvt:example:foo;<br> &mvt:example:bar;<br> <hr> <mvt:assign name="l.settings:example:list[0]" value="'Bananas'" /> <mvt:assign name="l.settings:example:list[1]" value="'Milk'" /> <mvt:assign name="l.settings:example:list[2]" value="'Bread'" /> <mvt:assign name="l.settings:example:list[3]" value="'Cereal'" /> &mvt:example:list[0];<br> &mvt:example:list[1];<br> &mvt:example:list[2];<br> &mvt:example:list[3];<br> <br> <mvt:foreach iterator="item" array="example:list"> &mvt:item;<br> </mvt:foreach> <hr> <mvt:assign name="l.settings:example:states[0]:abbr" value="'CA'" /> <mvt:assign name="l.settings:example:states[0]:name" value="'California'" /> <mvt:assign name="l.settings:example:states[1]:abbr" value="'FL'" /> <mvt:assign name="l.settings:example:states[1]:name" value="'Florida'" /> &mvt:example:states[0]:abbr; - &mvt:example:states[0]:name;<br> &mvt:example:states[1]:abbr; - &mvt:example:states[1]:name;<br> <br> <mvt:foreach iterator="state" array="example:states"> &mvt:state:abbr; - &mvt:state:name;<br> </mvt:foreach> <hr> <h4>Print Example Structure:</h4> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:example), ',', '<br>'))" />