Using logic (boolean) operators inside a "switch"
Posted: Sat Jun 22, 2002 5:11 pm
Hi,
Is it somehow possible to specify several options for a single case inside a switch block? Like this (which doesn't work):
I hope I don't need to write an individual case for each option...
Thanks in advance.
Is it somehow possible to specify several options for a single case inside a switch block? Like this (which doesn't work):
Code: Select all
switch ($something) {
case $this or $thisone or $eventhis:
//do something
default:
//do other stuff
}Thanks in advance.