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 PROTECTED] > Subject: [PHP] Switch Statement || Case with multiple values? > > > 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 delimited set of values for the case. Is > there a way to do > this in php?( i.e. if any of the comma delimited case values match the > switch expression, proceed with the specified case instructions) > > It's kind of cumbersome breaking out 5 cases when in CF I can > combine them > into one........ > > Let me know. > > --Noah > > > > -- > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php