Code: Select all
Array
(
[0] => bananaboat
[1] => frederick
[2] => lambda
)Code: Select all
implode('-', $myArray);bananaboat-frederick
as opposed to
bananaboat-frederick-lambda
Is there an elegant way of achieving this? My current solution involves a function that loops iterates through the array x times and returns the desired result, however I can't help but think it is somewhat clunky.