ez.no / exponential / documentation / reference / template operators / arrays / implode
$input_array|implode( $separator )
| Name | Type | Description | Required |
|---|---|---|---|
| separator | string | String to insert between array elements | yes |
String containing array elements separated by the specified separator.
Returns a string containing a string representation of all the array elements (from the inputted array) in the same order, with the separator string between each element.
{array( 1, 2, 3, 4, 5, 6, 7 )|implode( ', ' )}
returns the string "1, 2, 3, 4, 5, 6, 7".
{array( 1, 2, 3, 4, 5, 6, 7 )|implode( "_-_" )}
returns the string "1_-_2_-_3_-_4_-_5_-_6_-_7".
log in or create a user account to comment.
Comments