Skip to main content

Set Operations

array:merge — Merge arrays

Full reference →

Merges one or more arrays into the target array. String keys overwrite, numeric keys append.

Syntax

XML
<array:merge var="target" var_op1="source" />

array:unique — Remove duplicates

Full reference →

Removes duplicate values.

Syntax

XML
<array:unique var="array" />

array:diff — Set difference

Full reference →

Computes the difference between arrays.

Syntax

XML
<array:diff var="arr1" var_op1="arr2" var_result="result" />

array:intersect — Set intersection

Full reference →

Computes the intersection of arrays.

Syntax

XML
<array:intersect var="arr1" var_op1="arr2" var_result="result" />

array:union — Set union

Full reference →

Computes the union of arrays.

Syntax

XML
<array:union var="arr1" var_op1="arr2" var_result="result" />