Learn Codeigniter

Convert Array into String In PHP

We will use implode() function to convert Array into String In PHP .

Example

<?php
$array=array('first','second','third','fourth');
$commaSeparatedString = implode(",", $array);
?>

Output

first,second,third,fourth