Perl\'s join() ignores (skips) empty array values; PHP\'s implode() does not appear to.
join()
implode()
Suppose I have an array:
$array = a
$array = ["one", NULL, "two", NULL, "three"]; $string = implode("-", array_diff($array, [NULL])); echo $string;
Returns one-two-three
one-two-three