Menu Samaritan's Purse

IMPLODE

Join array elements with a string

SYNTAX

implode ( string $glue , array $pieces ) : string
implode ( array $pieces ) : string

PARAMETERS

glue

Defaults to an empty string.

pieces

The array of strings to implode.

RETURN

Returns a string containing a string representation of all the array elements in the same order, with the glue string between each element.

EXAMPLES

PIECES

'123'

GLUE PIECES

'1,2,3'

EMPTY

''

PHP