input|remove( offset [, length ] )
Name | Type | Description | Required |
---|---|---|---|
offset | integer | The offset to start removing elements. | Yes. |
length | integer | The number of elements that should be removed. | No. |
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).
{array( 1, 2, 3, 4, 5 )|remove( 2, 2 )}
The following array will be returned: ( 1, 2, 5 ).
{array( 1, 2, 3, 4, 5 )|remove( 2 )}
The following array will be returned: ( 1, 2, 4, 5 ).
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.