input|extract( offset [, length ] )
Name | Type | Description | Required |
---|---|---|---|
offset | integer | The offset to start at. | Yes. |
length | integer | The number of elements that should be extracted. | No. |
This operator will return a portion of the input array. The desired portion must be defined by the "offset" and "length" parameters. If the "length" parameter is omitted, the rest of the array (from offset) will be returned.
{array( 1, 2, 3, 4, 5, 6, 7 )|extract( 2 )}
The following array will be returned: ( 3, 4, 5, 6, 7 ).
{array( 1, 2, 3, 4, 5, 6, 7 )|extract( 3, 3 )}
The following array will be returned: ( 4, 5, 6 ).
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.