Flatten ViewHelper <f:flatten>
The FlattenViewHelper flattens a multi-dimensional array into a single-dimensional array.
Example
<f:flatten value="{0: {0: '1', 1: '2'}, 1: {0: '3', 1: '4'}}" />
Copied!
{0: '1', 1: '2', 2: '3', 3: '4'}
Copied!
Go to the source code of this ViewHelper: FlattenViewHelper.php (GitHub).
Arguments
The following arguments are available for the flatten ViewHelper:
value
-
- Type
- array
An array