Re: Correct context

From: Date: Tue, 21 Sep 2004 11:23:40 +0000
Subject: Re: Correct context
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197402@lists.php.net to get a copy of this message
Ed Curtis wrote:
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 ""
$valid_values = array("Copy Change","Banner Change","Price Change"); if (!in_array($entry,$valid_values) && !empty($row['photo_check'])) { //do something } Please, RTM on basic syntax and conditional statements.

« previous php.general (#197402) next »