PHP join() Function

The join() function of PHP returns a string from the elements of an array. This function is an alias of the implode() function.

Syntax

Parameter

separator(Optional)– Specifies what to put between the array elements. The default value is empty string (“”).

array(required)- This parameter represents the array to join to a string

Return

This function returns a string from the elements of an array.

Example 1

Output

Example 2

Output

Example 3

Output

Pin It on Pinterest

Share This