Print a comma separated list from an array with this snippet, instead of looping through an array using a foreach.
1 2 |
$commaSeparatedList = implode(', ', $array); echo $commaSeparatedList; |
Print a comma separated list from an array with this snippet, instead of looping through an array using a foreach.
1 2 |
$commaSeparatedList = implode(', ', $array); echo $commaSeparatedList; |