Join

join — Returns a string containing all the element of the given array with the separator string between each.

Basic Usage:

For $myArray populated with ['a','b','c'], the following will return the string abc.

{$myArray|join}
Output:
abc
{$myArray|join:'-'}
Output:
a-b-c
Was this article helpful?