If statement help [SOLVED]
Posted: Thu Aug 11, 2011 4:38 am
Hey guys,
I can't quite seem to figure this out... Why is it always bypassing this if statement, even if I select one of the values that it says it can't select? (For example, if I select a spell with an id of 4, even though the If statement (alledgedly) says that if I select that, that part of the script should be skipped, it continues to carry out that part of the code anyways)
Here is the line that it is bypassing when it shouldn't:
Do I need to switch the || to && ? I don't think I do, but who knows, nothing else seems to work 
Thanks!
I can't quite seem to figure this out... Why is it always bypassing this if statement, even if I select one of the values that it says it can't select? (For example, if I select a spell with an id of 4, even though the If statement (alledgedly) says that if I select that, that part of the script should be skipped, it continues to carry out that part of the code anyways)
Here is the line that it is bypassing when it shouldn't:
Code: Select all
if ($spellfetch['id'] !== 1 || $spellfetch['id'] !== 4 || $spellfetch['id'] !== 7 || $spellfetch['id'] !== 9 || $spellfetch['id'] !== 11 || $spellfetch['id'] !== 13 || $spellfetch['id'] !== 15 || $spellfetch['id'] !== 16 || $spellfetch['id'] !== 17)Thanks!