php how to convert array to string code example
Example 1: Array to String Conversion in PHP
$gadget = array( 'computer', 'mobile', 'tablet' );
echo implode($arr);
Example 2: php implode
$arr = ['Thor','Captain America','Iron Man'];
echo implode(', ',$arr);
// "Thor, Captain America, Iron Man"