RE: [PHP-WIN] Question concerning SWITCH and Comparisons

2004-11-11 Thread Tony Devlin
From: Alejandro César Garrammone [mailto:[EMAIL PROTECTED] Sent: Thursday, November 11, 2004 2:55 PM To: [EMAIL PROTECTED]; Php-Windows Subject: Re: [PHP-WIN] Question concerning SWITCH and Comparisons I think this may work...but doing some debbuging I suggest: case ($qty>=1600 and $qty< 24

Re: [PHP-WIN] Question concerning SWITCH and Comparisons

2004-11-11 Thread Alejandro César Garrammone
ps, Alex - Original Message - From: "Tony Devlin" <[EMAIL PROTECTED]> To: "Php-Windows" <[EMAIL PROTECTED]> Sent: Thursday, November 11, 2004 2:35 PM Subject: [PHP-WIN] Question concerning SWITCH and Comparisons > If my understanding of SWITCH is correct, it

RE: [PHP-WIN] Question concerning SWITCH and Comparisons

2004-11-11 Thread Svensson, B.A.T. (HKG)
Yepp, that true, and thats why we have switch. Otherwise switch would be syntactic suggar only. -Original Message- From: Gryffyn, Trevor To: Php-Windows Cc: [EMAIL PROTECTED] Sent: 11-11-2004 19:17 Subject: RE: [PHP-WIN] Question concerning SWITCH and Comparisons One thing I'll

RE: [PHP-WIN] Question concerning SWITCH and Comparisons

2004-11-11 Thread Gryffyn, Trevor
I'm sure there are other ways to use Switch/Case. I know you didn't ask for a whole tutorial and stuff, but it's a good thing to know how to use, very useful (and a lot nicer to play with than a bunch of nested if/then/else's). Did I screw anything up in those examples

[PHP-WIN] Question concerning SWITCH and Comparisons

2004-11-11 Thread Tony Devlin
If my understanding of SWITCH is correct, it stops at the first case that matches the result, correct? So then.. If I have a switch as such; switch($qty){ case ($qty < 1600): //$qty is less than 1600 do something break; case ($qty < 2400): //$qty is less than 2400 do something break; case