demorgans-law

PHP if/else errors

In the PHP below if I compare a variable using == it works as I would expect it to, if I use != then my code breaks, can someone explain or help? $_GET['p'] = 'home'; // DOES NOT work, it will always return "show JS" regardless to what string I have if ($_GET['p'] != 'home' || $_GET['p'] != 'create.account'){ echo 'show JS'; }else{...

deMorgan rules explained

Could you please explain the deMorgan rules as simply as possible (e.g. with a secondary school background) ? ...