"unique" Snippets


Make unique array

Created: 1465407480
View "Make unique array"
<mvt:assign name="g.array1" value="miva_array_deserialize( '1,2,3,4,5,6,7' )" /> <mvt:assign name="g.array2" value="miva_array_deserialize( '4,5,6,7' )" /> <mvt:assign name="g.uniqueHolder" value="''" /> <mvt:foreach iterator="number" array="global:array1"> <mvt:if expr="NOT miva_array_find(l.settings:number, g.uniqueHolder, 0)"> <mvt:assign name="l.array_length" value="miva_array_insert( g.uniqueHolder, l.settings:number, -1 )" /> </mvt:if> </mvt:foreach> <mvt:assign name="g.mvt_debug" value="miva_array_serialize( g.uniqueHolder )" /> &mvt:global:mvt_debug;