Thread: Using Or
View Single Post
  #3  
Old 03-11-2009, 12:11 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

That way won't work, you'd need to write the much more tedious method of:
Code:
 if (($item1 == 4861) || ($item1 == 4862) || ($item1 == 4863) || etc...
Since most of the items you're looking at are in a sequence, you might try something like:
Code:
 
if ( (($item1 >= 4861) && ($item1 <= 4867)) || (($item1 >= 4911) && ($item1 <= 4917)) ) {
for each set of items to cut down on the work.
Reply With Quote