You could just pass the array in a condition, without an operator... By default, it will use "IN"... Could avoid this whole loop...  And maybe the use of the "or" entirely?