RE: [PHP-WIN] Question concerning SWITCH and Comparisons
| From: | HKG) | Date: | Thu, 11 Nov 2004 18:26:42 +0000 |
| Subject: | RE: [PHP-WIN] Question concerning SWITCH and Comparisons | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-24967@lists.php.net to get a copy of this message | ||
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: tdevlin@airewaves.com
Sent: 11-11-2004 19:17
Subject: RE: [PHP-WIN] Question concerning SWITCH and Comparisons
One thing I'll point out that I didn't know before but someone on here
enlightened me to was that there's two ways to use switch, one where you
use switch($variable) and your case statements are what the $variable is
equal to, or you can use other kinds of conditions in your case
statement, then it doesn't really matter what your switch() contains: