How to: If($var != '#' OR '#')

From: Date: Wed, 20 Nov 2002 17:24:11 +0000
Subject: How to: If($var != '#' OR '#')
Groups: php.general 
Request: Send a blank email to php-general+get-125273@lists.php.net to get a copy of this message
I have code that says: if($_GET['sc'] != '2' OR '8'){ do this..... } but I doesn't work. What do I need to do to get it to work? I have checked operator precendence and all that and am still confused on whether I should be using '||' or 'OR' or something else... I have tried both of those, as well as 'XOR' and '^'. Help please! Jami

« previous php.general (#125273) next »