Let's say I have an array containing: apples, watermelons, grapes
. What I'm trying to do is create another array with
apples, apples;watermelons, apples;watermelons;grapes
I tried using implode, but it's not exactly what I wanted. Is there a built in function for this task? Thanks!
EDIT: For clarification, the created string is basically a combination of these three elements. So the created array could also look like:
apples, apples-watermelons, apples-watermelons-grapes