A::implode()
Join array elements as a string, also supporting nested arrays
A::implode(array $array, string $separator = ''): string
Parameters
Name | Type | Default |
---|---|---|
$array * | array |
– |
$separator | string |
'' |
Return type
string
Parent class
Example
$array = ['a', 'b', ['cc', 'dd']];
A::implode($array); // abccdd
A::implode($array, ', '); // a, b, cc, dd