RE: **[SPAM]** [PHP] Correct context

From: Date: Mon, 20 Sep 2004 17:21:50 +0000
Subject: RE: **[SPAM]** [PHP] Correct context
Groups: php.general 
Request: Send a blank email to php-general+get-197317@lists.php.net to get a copy of this message
[snip] Before I go screwing this code up I thought I would ask for the formatting. How would you write the following in PHP? if $entry not equal to "Copy Change" OR "Banner Change" OR "Price Change" AND $row['photo_check'] not equal to "" [/snip] There are several ways .... here is one.... if(("" != $row['photo_check']) && (("Copy Change" != $entry) || ("Banner Change" != $entry) || ("Price Change" != $entry))) Note the parentheses to define preference order.

« previous php.general (#197317) next »