Re: find string

From: Date: Sun, 10 Aug 2003 23:39:47 +0000
Subject: Re: find string
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-159076@lists.php.net to get a copy of this message
> > if ($action!='a1' || $action!='a3') //tried == also > { > //do stuff > } > else > { > //do other stuff > } > the logic behind this particular one doesn't work... if it's either not one, or not the other... it'll always be true... unless both are set to exactly the same... the logic if($action=="a1" || $action == "a3" ) should work find tho, coz it's checking to see if either is true... check what $action is actually set to by doing a print just before your if statement, and then stick two print's inside the if... true and false, in the respective place... hope this helps...

« previous php.general (#159076) next »