I have this code: PHP: if($gamecount==0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11) $player->setFood(20); but I know it's very wrong. It just doesn't look right. Is there a way to get all the numbers from 0 to 11 without using or? something like: PHP: if($gamecount==0-11) $player->setFood(20); but I'm pretty sure that's also wrong.
You could use: Code: if($gamecount >= 0 && $gamecount < 12){ } This allows the range to be 0 - 11 and cannot surpass it.
Don't read PHP as a human. Read it as a machine. == means "equal". This is different from the English "is". In English, "is" is followed by a description of the subject, so "he is a person" does not mean "he" == "a person", but that "he" has the attributes of "a person". "I am SOFe" means "I" satisfies the definition of "SOFe", but "I" is not equal to "SOFe" (and much less "PEMapModder" is equal to "SOFe").