RE: [PHP] Re: unless something...

From: Date: Thu, 12 Sep 2002 22:49:40 +0000
Subject: RE: [PHP] Re: unless something...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116220@lists.php.net to get a copy of this message
Doing stuff with || is always a good way to stuff up. In the case of your example it will always evaluate to true. > if ($A != $C || $B != $C) { > > I think, but im fairly new This would work if you did this: If (!($A == $C || $B == $C)) { > > In perl, I would do this: > > > > unless ($c =~ /$a|$b/) { > > blabla > > exit 0 > > }

« previous php.general (#116220) next »