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 Ch
[snip]
>There are several ways here is one
>
Longer but seems more readable to me.
[/snip]
Another way
$arrFoo = array (
'Copy Change',
'Banner Change',
'Price Change',
);
if(!(in_array($entry)) && ("" != $row['photo_check']))
--
PHP General Mailing List (
Mattias Thorslund wrote:
Disclaimer: I have probably left a silly typo somewhere.
Sure did:
My old nemesis, end parethesis (either too few or too many).
It should be:
if("" != $row['photo_check']){
switch($entry){
case "Copy Change":
case "Banner Change":
case "Price Change":
Jay Blanchard wrote:
[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
On Mon, 20 Sep 2004, Jay Blanchard wrote:
> 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.
That's what I was looki
[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"
AN
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
$ro
7 matches
Mail list logo