ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

remove

Summary

Returns the input array without some of the original elements.

Usage

input|remove( offset [, length ] )

Parameters

NameTypeDescriptionRequired
offset integer The offset to start removing elements. Yes.
length integer The number of elements that should be removed. No.

Returns

A cut-down version of the input array.

Description

This operator removes element(s) from the input array and thus a chopped/cut-down version of the input array will be returned. The "offset" parameter must be used to define the start of the portion that should be removed. The "length" parameter can be used to define the number of elements that should be removed. If the "length" parameter is omitted, only one elemen (specified by offset will be removed).

Examples

Example 1

{array( 1, 2, 3, 4, 5 )|remove( 2, 2 )}

The following array will be returned: ( 1, 2, 5 ).

Example 2

{array( 1, 2, 3, 4, 5 )|remove( 2 )}

The following array will be returned: ( 1, 2, 4, 5 ).

Balazs Halasy (05/02/2004 9:33 am)

Balazs Halasy (14/12/2005 3:32 pm)


Comments

There are no comments.