implode
PHP 4, PHP 5, PHP 7, PHP 8
implode - Join array elements with a string
implode(
string$separator,
array$array ): string
Alternative signature (not supported with named arguments):
stringimplode arrayarrayParameters
- separator
-
Optional. Defaults to an empty string.
- array
-
The array of strings to implode.
Return Values
Returns a string containing a string representation of all the array elements in the same order, with the separator string between each element.
Notes
Note:
This function is binary-safe.
Changelog
Version | Description |
8.0.0 | Passing the separator after the array is no longer supported. |
7.4.0 | Passing the separator after the array (i.e. using the legacy signature) has been deprecated. |