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

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 what I do

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

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 used in the context you are attempting

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 -- a

[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

RE: [PHP] Another problem with conditional statements

2002-12-19 Thread Sean Malloy
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 General Subject: [PHP] Another problem with conditional statements Hi, This should

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Rick Emery
: 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 ways, but no matter what I do it's wrong

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Beauford.2002
[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() does not work that way. Switch uses the value in the parentheses and selects a CASE based upon

RE: [PHP] Another problem with conditional statements

2002-12-19 Thread Sean Malloy
: 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 statements I believe you are incorrect. Switch will look for the first

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Beauford.2002
: Sean Malloy [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Thursday, December 19, 2002 9:36 PM Subject: RE: [PHP] Another problem with conditional statements Nowhere in the documentation does it specify switch should be used in the context you are attempting. The docs show a single

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 someone