Reputation: 3163
I got an array like this:
Array ( [0] => shop [1] => kids [2] => shorts )
Now I want all the values implode
seperated with a slash /
. BUT I want to pass the first key, [0]
.
Doing an implode()
on the above will result in:
shop/kids/shorts
But I want this result:
kids/shorts
Is this possible? I can't find anything for the implode()
function to start from a specific key or ignore the first array entries
.
Upvotes: 2
Views: 527
Reputation: 10638
Use array_shift
before the implode:
array_shift($array);
$data = implode('/', $array);
Upvotes: 5