implode()

It joins array elements with a string

Example

<?php
$arry = array(“PHP”,”HTML”,”JS”);
echo implode(“,”,$arry);
?>

Output

PHP,HTML,JS

Share