Re: Logic

From: Date: Wed, 05 Dec 2001 01:38:00 +0000
Subject: Re: Logic
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-76632@lists.php.net to get a copy of this message
You need parentheses around the entire antecedent: if (($type !="add") || ($type !="edit") || ($type !="delete")) { //etc ^------- Note these parentheses---------------------------^ Hope that helps. At 05:28 PM 12/4/2001, Dan McCullough wrote:
Question. I am trying to check to see if a certain piece of code should be run. Here is an example. if ($type != "add") || ($type != "edit") || ($type != "delete") {//if this or this or this then then run this code } else { then run this } Is this correct, for some reason this isn't working.
Sliante, Richard S. Crawford http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford MSN: underpope@hotmail.com "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!"

« previous php.general (#76632) next »