I have setup a switch statment with 6 cases, 2 of which have multiple statements for each case. When a case is called with more than 1 statement, only the first statement is run.
For example, if $VisitDate is set to October 10, only the first line of the case is executed ($ProgramName = "Super Visit Days"😉 and I can't figure out why. Any help would be appreciated.
Here is the code
switch ($VisitDate) {
case 'September 24':
$ProgramName = "Fall Open House";
break;
case 'October 10':
$ProgramName = "Super Visit Days";
$Transportation = "n/a";
$Session = "n/a";
break;
case 'October 15':
$ProgramName = "Fall Open House";
break;
case 'November 11':
$ProgramName = "Super Visit Days";
$Transportation = "n/a";
$Session = "n/a";
break;
case 'Cancelled':
$ProgramName = $_GET['ProgramName'];
break;
default:
die("Invalid date specified. Please use the back button and try again.");
break;
}