ez.no / exponential / documentation / reference / template operators / arrays / explode
$input_array|explode( $offset )
| Name | Type | Description | Required |
|---|---|---|---|
| offset | integer | Array offset to split array | yes |
Array containing the original array split into two arrays.
The explode operator will expect an array as input. It will expect the parameter to be an integer offset specifying where to split the array in two. It will return an array containing the two resulting arrays.
{array( 1, 2, 3, 4, 5 )|explode( 3 )}
returns the following array: ( array( 1, 2, 3 ), array( 4, 5 ) ).
log in or create a user account to comment.
Comments