PHP join() function


In this article, We will explain to you PHP join() function with example.

PHP join() function

The join() is a built-in function of PHP. which is used to convert the array elements into a string. so you can see our PHP String Function example.

Syntax

join(separator,array);

Paramerter Option

separatorThis is Required Paramerter. Specifies what to put between the array elements
arrayThis is Required Paramerter. you can use the array

Example

<?PHP
   $arr = array('This','is','My','website');
   echo join(" ",$arr);
?>

Output

This is My website