$d=1; switch ($d){ case 1; $player->sendMessage("1"); if($d=1){ $d=$d+1; } break; case 2; $player->sendMessage("2"); if($d=2){ $d=1; } break; or another code without if switch ($d){ case 1; $player->sendMessage("1"); if($d=1){ $d=$d+1; break; case 2; $player->sendMessage("2"); $d=1; break; } Is this Wrong? It doesn't work both of them.
What are you trying to do? To check if a variable is a certain value you have to do PHP: if($d === 1)