Reputation: 9808
Is there an easy way, preferably a one-liner, to implode an array range.
Example:
array(1,4,6,88,51,3,5,48,59,4);
In addition, how would I be able to implode between the first and the third value only?
Upvotes: 0
Views: 2162
Reputation: 522145
implode(',', $range); implode(',', array_slice($range, 0, 3));
Upvotes: 6