How do I merge all the array items into a single string?
Use the implode function.
implode
For example:
$fruits = array('apples', 'pears', 'bananas'); echo implode(',', $fruits);
2.1m questions
2.1m answers
60 comments
56.9k users