...if the strings get larger, you risk matching "food" with when you're seeking "foo". And if the strings ever contain spaces, you risk more false positives.
Right, thanks. I should have thought of that myself. In other words, this 'idiom' is highly dangerous.
daveIn reply to Re: Re: Is X in my array?
by Not_a_Number
in thread Is X in my array?
by Not_a_Number
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |