emehrkay Posted May 2, 2007 Share Posted May 2, 2007 eg case 'foo' || 'bar': ... ?? thanks Link to comment https://forums.phpfreaks.com/topic/49589-is-it-possible-to-use-an-operator-in-a-switch-case/ Share on other sites More sharing options...
utexas_pjm Posted May 2, 2007 Share Posted May 2, 2007 You can achieve that implicitly like this: <?php switch($imput){ case 'foo': case 'bar': doSomething(); break; } ?> Link to comment https://forums.phpfreaks.com/topic/49589-is-it-possible-to-use-an-operator-in-a-switch-case/#findComment-243132 Share on other sites More sharing options...
emehrkay Posted May 2, 2007 Author Share Posted May 2, 2007 makes sense, thanks im surprised that you dont have more stars, you know your stuff. ill put a bid in for you Link to comment https://forums.phpfreaks.com/topic/49589-is-it-possible-to-use-an-operator-in-a-switch-case/#findComment-243142 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.