If 0 is the first element in the array, modulus omits it from the results. If the array starts with a negative integer and contains 0, modulus tries to divide by zero and dies horribly.
These solutions could be fixed with some extra conditionals, but I think the other solutions are better.
In reply to Re: remove duplicates from array
by chipmunk
in thread remove duplicates from array
by mkmcconn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |