Replaces array_search() for in_array().