I've been using this:
if (in_array($value, array(foo, bar, blah)))
{
// do something
}
but if you want to use a switch/case, I don't know any easier way.
HTH
Martin
-Original Message-
From: CF High [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 1:41 PM
To: [EMAIL
Check the manual:
switch($foo)
{
case fee:
case fie:
...
break;
case fo:
...
case fum:
...
break;
}
fee fie are tied together, fie will also run the code presented by fum ...
Even
switch($value){
case 'foo':
case 'bar':
//It's either foo or bar
break;
}
CF High wrote:
Hey all.
In Cold Fusion I was able to do the following:
CFSWITCH expression = #action#
CFCASE value = getUpdate,getDelete
Do Stuff
/CFCASE
/CFSWITCH
Note the comma
Duh. make that
fo will also run the code presented by fum ...
-Original Message-
From: Mark Charette [mailto:[EMAIL PROTECTED]
switch($foo)
{
case fee:
case fie:
...
break;
case fo:
...
case fum:
4 matches
Mail list logo