Cant be done mate, do it like this...

switch ($val){
 case "FFS":
 case "FHG":
 case "FRG":
  //stuff
 break;

 case "DPT":
 case "DL":
 case "DF":
 case "DI":
 case "DO":
  //stuff
 break;
}

The cases pass through each other till they hit a 'break'

;o)
Bix

"Stephen Goddard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Folks,
>
> Anyone know if you can use operators in a switch function? eg.
>
>
> switch ($category){
>      case "FFS" || "FHG" || "FRG":
>            $soldID = "SFFS";
>            break;
>      case "DPT" || "DL" || "DF" || "DI" || "DO":
>            $soldID = "SDPT";
>            break;
> }
>
> Cheers
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to