What is the difference between IMPLODE
& JOIN
as both works the same way.
join()
is an alias for implode()
, so implode
is theoretically more "PHP native" though there is absolutely no performance increase to be gained by using it.
On the other hand, join()
is found in, amongst other languages, Perl, Python and ECMAScript (including JavaScript) and so is much more portable in terms of comprehensibility to a wider audience of programmers.
So although explode
and implode
are unarguably way more dramatic-sounding, I would vote for join
as a more universal way to express the concatenation of every value of an array into a string.