"structures" Snippets


Basket #46697

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1496853449
View "Basket #46697"
<mvt:assign name="g.foo" value="'bar'" /> &mvte:global:foo;<mvt:assign name="g.foo" value="'bar'" /> &mvte:global:foo;<mvt:assign name="g.foo" value="'bar'" /> &mvte:global:foo;<mvt:assign name="g.foo" value="'bar'" /> &mvte:global:foo;<mvt:assign name="g.foo" value="'bar'" /> &mvte:global:foo;<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>'))" />
 

Snippet: 1490660523 - v2

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1490660534
View "Snippet: 1490660523 - v2"
<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[1]" value="'Bananas'" /> <mvt:assign name="l.settings:example:list[2]" value="'Milk'" /> <mvt:assign name="l.settings:example:list[3]" value="'Bread'" /> <mvt:assign name="l.settings:example:list[4]" 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[1]:abbr" value="'CA'" /> <mvt:assign name="l.settings:example:states[1]:name" value="'California'" /> <mvt:assign name="l.settings:example:states[2]:abbr" value="'FL'" /> <mvt:assign name="l.settings:example:states[2]:name" value="'Florida'" /> &mvt:example:states[1]:abbr; - &mvt:example:states[1]:name;<br> &mvt:example:states[2]:abbr; - &mvt:example:states[2]: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>'))" />
 

Snippet: 1490660523 - v1

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1490660523
View "Snippet: 1490660523 - v1"
<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[1]" value="'Bananas'" /> <mvt:assign name="l.settings:example:list[2]" value="'Milk'" /> <mvt:assign name="l.settings:example:list[3]" value="'Bread'" /> <mvt:assign name="l.settings:example:list[4]" 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[1]:abbr" value="'CA'" /> <mvt:assign name="l.settings:example:states[1]:name" value="'California'" /> <mvt:assign name="l.settings:example:states[2]:abbr" value="'FL'" /> <mvt:assign name="l.settings:example:states[2]:name" value="'Florida'" /> &mvt:example:states[1]:abbr; - &mvt:example:states[1]:name;<br> &mvt:example:states[2]:abbr; - &mvt:example:states[2]: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>'))" />
 

Basket #36203

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1489530230
View "Basket #36203"
<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>'))" /> <hr> <mvt:assign name="l.settings:testArray:color[1]" value="'red'" /> <mvt:assign name="l.settings:testArray:color[2]" value="'blue'" /> <mvt:assign name="l.settings:testArray:color[3]" value="'green'" /> <mvt:assign name="l.settings:testArray:color[4]" value="'orange'" /> <mvt:assign name="l.settings:testArray:color[5]" value="'yellow'" /> <mvt:foreach iterator="color" array="testArray:color"> <mvt:if expr="pos1 MOD 4 EQ 0"> &mvte:color; </mvt:if> </mvt:foreach> <hr> <mvt:assign name="l.settings:some_string" value="'My name is Juan.'" /> <mvt:assign name="l.settings:replace_string" value="glosub(l.settings:some_string, 'My name is', 'Me llamo')" /> &mvte:some_string;<br /> &mvte:replace_string; <hr> <mvt:assign name="l.settings:one" value="'Hello my name is '" /> <mvt:assign name="l.settings:two" value="'James'" /> <mvt:eval expr="l.settings:one $ l.settings:two" /> <hr> <mvt:assign name="l.settings:three" value="'Hello my name is James.'" /> <mvt:assign name="four" value="substring(l.settings:three, 6, len(l.settings:three))" /> &mvte:global:four; <hr> <mvt:assign name="l.name" value="'James'" /> &mvte:name; <!-- nope --> <mvt:eval expr="name" /> <!-- yep -->
 

Basket #32004

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1485540531
View "Basket #32004"
<mvt:assign name="g.basketTotalWeight" value="0.02 * power(10,2)" /> &mvt:global:basketTotalWeight;
 

Basket #28881

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1481045647
View "Basket #28881"
<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>'))" />
 

Basket #25800

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1474566170
View "Basket #25800"
<mvt:assign name="g.foo" value="'bar'" /> &mvte:global:foo; <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[3]:abbr" value="'CA'" /> <mvt:assign name="l.settings:example:states[3]: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:assign name="l.settings:example:states[2]:abbr" value=" 'MD' " /> <mvt:assign name="l.settings:example:states[2]:name" value=" 'Maryland' " /> &mvt:example:states[3]:abbr; - &mvt:example:states[3]: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>'))" />
 

Basket #24013

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1470756520
View "Basket #24013"
<mvt:assign name="l.settings:example:foo" value="'bar'" /> <mvt:assign name="l.settings:example:bar" value="'baz'" /> <mvt:assign name="g.example" value="'test'" /> &mvt:global: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> Array loop: <mvt:foreach iterator="item" array="example:list"> &mvt:item;<br> </mvt:foreach> <hr> &mvt:item; <---sdflkjsdf <br /> miva array elements:<mvt:eval expr="miva_array_elements(l.settings:example:list)" /> <hr /> <mvt:assign name="l.settings:success" value="glosub( 'this is a test', 'test', 'testing' )" /> &mvt:success; <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:assign name="l.settings:example:states[1]:otherstuff[1]:test" value="'tesasfsdgfwert'" /> &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>'))" />
 
View "Basket #19297"
<mvt:assign name="l.fruit" value="'banana,apple,peach'"/> <mvt:assign name="l.settings:fruits" value="miva_array_deserialize( l.fruit )"/> <mvt:foreach iterator="fruit" array="fruits"> &mvt:fruit;<br> </mvt:foreach>
 
View "Basket #6092"
<mvt:assign name="l.fruit" value="'banana,apple,peach,test'"/> <mvt:assign name="l.settings:fruits" value="miva_array_deserialize( l.fruit )"/> <mvt:foreach iterator="fruit" array="fruits"> &mvt:fruit;<br> </mvt:foreach>
 

Basket #4590

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1438905859
View "Basket #4590"
<mvt:assign name="g.foo" value="'bar'" /> <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[1]" value="'Bananas'" /> <mvt:assign name="l.settings:example:list[2]" value="'Milk'" /> <mvt:assign name="l.settings:example:list[3]" value="'Bread'" /> <mvt:assign name="l.settings:example:list[4]" value="'Cereal'" /> &mvt:example:list[1];<br> &mvt:example:list[2];<br> &mvt:example:list[3];<br> &mvt:example:list[4];<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>'))" />
 
View "Miva Array Deserialize "
<mvt:assign name="l.fruit" value="'banana,apple,peach'"/> <mvt:assign name="l.settings:fruits" value="miva_array_deserialize( l.fruit )"/> <mvt:foreach iterator="fruit" array="fruits"> &mvt:fruit;<br> </mvt:foreach>
 

Basket #1319

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1430861164
View "Basket #1319"
<mvt:assign name="l.serialized" value="':customfields:aromaticScent=Peppermint+Western+U.S.+essential+oil+has+a+fresh%2C+cool%2C+grassy-minty+scent+that+is+cleaner%2C+smoother%2C+and+more+refined+than+Indian+Peppermint.,:customfields:extractionMethod=Steam+Distilled,:customfields:product_type=Essential+Oil,:customfields:size=10+ml+%281%2F3+oz%29,:customfields:strengthOfAroma=Strong'" /> <mvt:assign name="l.serialized" value="l.serialized $ ',:customfields:strengthOfAroma=Weak'" /> <mvt:assign name="l.settings:deserialized" value="miva_array_deserialize( l.serialized )" /> &mvt:deserialized:customfields:strengthOfAroma;
 

Basket #895

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1429558536
View "Basket #895"
<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>'))" />
 

Snippet: 1429558522 - v1

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1429558522
View "Snippet: 1429558522 - v1"
<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>'))" />
 

Basket #454

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1427408414
View "Basket #454"
<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[1];<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>'))" />
 

Basket #447

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1427395253
View "Basket #447"
<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>'))" />
 

Structures

[Video Tutorial](http://www.miva.com/videos/web_developers/structures) Structures are a lot like arrays.
Created: 1427238160
View "Structures"
<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>'))" />