Skip to content

Sort One Dimensional Array#


Description#

Example of how to use QuickSortArray to sort a one dimensional array

Snippet#

<mvt:assign name="l.settings:list[1]" value="'apples'" />
<mvt:assign name="l.settings:list[2]" value="'bananas'" />
<mvt:assign name="l.settings:list[3]" value="'carrots'" />

<h2>Before</h2>
<mvt:foreach iterator="item" array="list">
    &mvt:item;<br>
</mvt:foreach>


<mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:list, '', -1)" />

<h2>After</h2>
<mvt:foreach iterator="item" array="list">
    &mvt:item;<br>
</mvt:foreach>

Functions Used#

  • QuickSortArray