I've found the following useful if you don't want to use a bunch of if /
else if but you need to do more than a simple comparison:
switch(true) {
case ($a=='a') : // Behaves like a normal switch
break;
case ($a===1) : // Strict check
break;
case ($a>$b) : // Do whatever test you'd li
Ken Robinson wrote:
At 12:23 PM 12/1/2007, David Krings wrote:
Hi!
I make use of a switch statement, but now need to execute the same
code of one case for a different case (it is a switch on a file type
and some types are to be handled the same). I know how to craft this
case using if, but h
At 12:23 PM 12/1/2007, David Krings wrote:
Hi!
I make use of a switch statement, but now need to execute the same
code of one case for a different case (it is a switch on a file type
and some types are to be handled the same). I know how to craft this
case using if, but how would I do that wi
Hi!
I make use of a switch statement, but now need to execute the same code of one
case for a different case (it is a switch on a file type and some types are to
be handled the same). I know how to craft this case using if, but how would I
do that with using case within a switch?
Is it someth