Skip to main content

Chunk-split array

Anatomy

<array:chunk var="var" var_result="(destructive on 'var')" length="1"/>

Description: ARRAY:CHUNK splits an array into chunks of a given length.

Attention:

ARRAY:CHUNK is destructive, in the sense that it modifies the array in-place, unless 'var_result' is specified in which case a copy of the resulting array will be stored in 'var_result' instead. It preserves the key and value associations of the array.

Attributes

NameTypeDescriptionDefined By
varvarVariable name array:chunk
var_resultvarResult variable name array:chunk
lengthintLength array:chunk

Results:

BindingTypePredicate
varvar_resultarray