PHP implode() function


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

PHP implode() function

The implode() 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

implode(separator,array);

Paramerter Option

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

Example

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

Output

This is My website