RE: [PHP] Another problem with conditional statements

2002-12-20 Thread Ford, Mike [LSS]
> -Original Message- > From: Beauford.2002 [mailto:[EMAIL PROTECTED]] > Sent: 20 December 2002 03:15 > > > Using switch would be more efficiant as it would stop once a > match is made > (if you use break), but with eleif statements each one is evaluated in > order. Not sure that's true

RE: [PHP] Another problem with conditional statements

2002-12-20 Thread Ford, Mike [LSS]
> -Original Message- > From: Sean Malloy [mailto:[EMAIL PROTECTED]] > Sent: 20 December 2002 02:36 > To: PHP General > Subject: RE: [PHP] Another problem with conditional statements > > > Nowhere in the documentation does it specify switch should be > us

RE: [PHP] Another problem with conditional statements

2002-12-20 Thread Ford, Mike [LSS]
> -Original Message- > From: Rick Emery [mailto:[EMAIL PROTECTED]] > Sent: 20 December 2002 00:34 > > switch() does not work that way. Switch uses the value in > the parentheses and selects a > CASE based upon that value. Read the manual. > > You will have to use a series of if()-elsei

RE: [PHP] Another problem with conditional statements

2002-12-20 Thread Ford, Mike [LSS]
> -Original Message- > From: Beauford.2002 [mailto:[EMAIL PROTECTED]] > Sent: 20 December 2002 00:19 > > This should be as simple as breathing, but not today. I have > two variables > $a and $b which I need to compare in a switch statement in > several different > ways, but no matter wha

Re: [PHP] Another problem with conditional statements

2002-12-20 Thread Jason Wong
On Friday 20 December 2002 08:28, Sean Malloy wrote: > Its all wrong. You shouldn't be using a switch statement anyway. A switch > is for evaluating a single variable. You can use the switch construct in the context that the OP was using it. In fact I prefer use that instead of a whole bunch of i

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Jason Wong
On Friday 20 December 2002 08:19, Beauford.2002 wrote: > Hi, > > This should be as simple as breathing, but not today. I have two variables > $a and $b which I need to compare in a switch statement in several > different ways, but no matter what I do it's wrong. > > This is what I have tried, can s

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Beauford.2002
|| $chr == "ê": $a = str_replace(substr($a,$i,1),"e",$a); break; } - Original Message - From: "Sean Malloy" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 9:36 PM Subject: RE: [PHP] Another problem

RE: [PHP] Another problem with conditional statements

2002-12-19 Thread Sean Malloy
7;help'): showHelp(); break; default : showDefault(); } > -Original Message- > From: Beauford.2002 [mailto:[EMAIL PROTECTED]] > Sent: Friday, 20 December 2002 12:46 PM > To: Rick Emery > Cc: PHP General > Subject: Re: [PHP] Another problem with conditional sta

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Beauford.2002
ginal Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Beauford.2002" <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 7:33 PM Subject: Re: [PHP] Another problem with conditional statements > switch

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Rick Emery
al" <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 6:19 PM Subject: [PHP] Another problem with conditional statements Hi, This should be as simple as breathing, but not today. I have two variables $a and $b which I need to compare in a switch statement in several different wa

RE: [PHP] Another problem with conditional statements

2002-12-19 Thread Sean Malloy
something else'; break; default: $blah = 'nothing'; } you evaluate a single variable, otherwise, you are stuck with using is/else statements > -Original Message- > From: Beauford.2002 [mailto:[EMAIL PROTECTED]] > Sent: Friday, 20 December 2002 11:19 AM > To: PHP

[PHP] Another problem with conditional statements

2002-12-19 Thread Beauford.2002
Hi, This should be as simple as breathing, but not today. I have two variables $a and $b which I need to compare in a switch statement in several different ways, but no matter what I do it's wrong. This is what I have tried, can someone tell me how it should be. TIA switch (true): case ($a