PHP function join()

Availability in PHP 4.0

&Alias; implode

Parameters

Parameter Data type Default value Note
$glue string "", Defaults to an empty string. This is not the preferred usage of implode as glue would be the second parameter and thus, the bad prototype would be used.
$pieces array not The array of strings to implode.

Return values

string

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

Other resources

Official documentation of the join function

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.