- implode: documentation ( source)
<?php $shoppingList = array('wine ', 'fish', 'bread', 'grapes', 'cheese');
foreach ($shoppingList as $item) {
# echo $item . "\n";
$cool = $item . " is good\t";
$fun ="\t";
echo $fun . $cool;
}
echo implode($shoppingList, "\n");