Thread: case statement
View Single Post
  #1 (permalink)  
Old August 14th, 2003, 09:13 PM
jakeone jakeone is offline
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default case statement

Hello,

I tried the following:

switch($new_t1)
case "D","W":
if ($new_p1<1 OR $new_p1>30) {
$t1_errMsg = "The number of billing cycle days/weeks must be between 1 and 30";
}
break;

but received an error stating, "unexpected T_CASE, expecting ':' or '{' "

I assume case "D","W": is what's causing the problem. Do I have to treat these as separate case statements? If so, seems rather inefficient.

Thanks.

Reply With Quote