The
implode() and
join() string functions in PHP currently perform the same operation so I am putting them together and we will demonstrate them using implode() only. They are both used to combine elements of an array into a string. join() works just like implode().
implode() (and jojn() ) does the opposite of explode(). While implode() combines array elements to make a string, explode() takes a string and makes an array out of it. And very much like explode(), with implode() you get to choose what goes in between each part of the array as it becomes a string.

<?php
$myArray = array("Welcome","to","the","show!");
$implodedArray = implode(" ", $myArray); // Space implode
echo "$implodedArray<br />";
$implodedArray = implode("-", $myArray); // Dash implode
echo "$implodedArray<br />";
?>
Welcome to the show!
Welcome-to-the-show!