Because questions asking for "the most efficient way" rub people the wrong way. But that's not all.
If you have a collection, and you want to check if something is present in that collection, you need to iterate over that collection. So your "without loops" constraint, added later in comments, rubbed people even more in the wrong way. But that still is not all.
If you could instead explain why this is a real problem (do you have an array containing hundreds of thousands of items, or is the product of the needles and haystack in that order of magnitude), does using the code you have on your website incur a measurable performance problem?
Then mention that performance problem, and show what you have tried to mitigate it. Have you looked at other collection types, like a hashmap? This has an insertion penalty compared to arrays, but has way faster lookup than simply iterating.
And so on. So no, it's not "users who can't provide a solution" who close your question. It's users who think it can't be answered in its current form, and the fact that you claim the two great answers you received aren't usable, confirms that. You just want people to throw suggestions your way until you find one that sticks, and that's not how this works.