I've got an array like this:
Array
(
[0] => Array
(
[name] => Something
)
[1] => Array
(
[name] => Something else
)
[2] => Array
(
[name] => Something else....
)
)
Is there a simple way of imploding the values into a string, like this:
echo implode(', ', $array[index]['name']) // result: Something, Something else, Something else...
without using a loop to concate the values, like this:
foreach ($array as $key => $val) {
$string .= ', ' . $val;
}
$string = substr($string, 0, -2); // Needed to cut of the last ', '