I have using a 'switch' to retrieve the name of the website section through
sending a 'section' integer...
function title($section)
{
switch ($section)
{
case 0:
$output = "Introducti on";
case 1:
$output = "login";
case 2:
$output = "choose_dat e";
case 3:
$output = "am_pm";
case 4:
$output = "hour";
case 5:
$output = "choose_tim e";
case 6:
$output = "slots";
case 7:
$output = "add_notes" ;
case 8:
$output = "confirm";
case 9:
$output = "booked";
default:
$output = "Introducti on";
}
return $output;
}
However, no matter what number I sent to the command I am getting the
default case out (Introduction).
This seems like a very simple command, where am I going wrong???
Many thanks
Jamie
sending a 'section' integer...
function title($section)
{
switch ($section)
{
case 0:
$output = "Introducti on";
case 1:
$output = "login";
case 2:
$output = "choose_dat e";
case 3:
$output = "am_pm";
case 4:
$output = "hour";
case 5:
$output = "choose_tim e";
case 6:
$output = "slots";
case 7:
$output = "add_notes" ;
case 8:
$output = "confirm";
case 9:
$output = "booked";
default:
$output = "Introducti on";
}
return $output;
}
However, no matter what number I sent to the command I am getting the
default case out (Introduction).
This seems like a very simple command, where am I going wrong???
Many thanks
Jamie
Comment