Re: [PHP] Correct context

2004-09-21 Thread Burhan Khalid
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

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

2004-09-20 Thread Jay Blanchard
[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 (

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

2004-09-20 Thread Mattias Thorslund
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":

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

2004-09-20 Thread Mattias Thorslund
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

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

2004-09-20 Thread Ed Curtis
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

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

2004-09-20 Thread Jay Blanchard
[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

[PHP] Correct context

2004-09-20 Thread Ed Curtis
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