I have a certain input that when the user enters a word in needs to be checked against a list of 100 words. How would I loop through these words the easiest? Should I use a massive array?
If you don't care about case sensitivity or typos, this is the most straight-forward way:
$word = 'foo';
$wordList = array('foo', 'bar', 'baz', ...);
$wordIsInWordList = in_array($word, $wordList);