RE: [PHP] How to: If($var != '#' OR '#')
| From: | John W. Holmes | Date: | Wed, 20 Nov 2002 17:28:26 +0000 |
| Subject: | RE: [PHP] How to: If($var != '#' OR '#') | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125274@lists.php.net to get a copy of this message | ||
> I have code that says:
>
> if($_GET['sc'] != '2' OR '8'){
> do this.....
> }
if($_GET['sc'] != 2 || $_GET['sc'] != 8)
{ do this... }
You don't need the single quotes if you're comparing integers.
---John Holmes...