Hi there
Is it possible to perform switch - case with more than one variable, eg can:
if( $a == "a" or $b == "b" )
{
// something
}
elseif( $a == "x" or $b == "b" )
// something else
}
be changed into something like:
switch( $a, $b)
{
case "a", "b" :
// something
break;
case "x", "b" :
// something else
break;
}
or am I going to have to use nested switches?
Ta once again!
-Colin
Is it possible to perform switch - case with more than one variable, eg can:
if( $a == "a" or $b == "b" )
{
// something
}
elseif( $a == "x" or $b == "b" )
// something else
}
be changed into something like:
switch( $a, $b)
{
case "a", "b" :
// something
break;
case "x", "b" :
// something else
break;
}
or am I going to have to use nested switches?
Ta once again!
-Colin