WTF "A equals B or C" isn't understood by a computer. The `or` operator in programming is not like the "or" in the sentence "A is B or C" in English which is a connective creating a set of data. The `or` operator can only be used to connect two independent conditions. You should write this instead: PHP: if($player->getLevel()->getName() == $lobby or $player->getLevel()->getName() == $lobby2){ Or if you are searching from an array: PHP: if(in_array($player->getLevel()->getName(), $arrayOfWorldNames)){