34,333
edits
Changes
→PHP ''switch'' Statements
$customerName = "Edward";
if ($customerName == "Carl")
{
echo 'Hello Carl!';
}
else if ($customerName == "Fred")
{
echo 'Hello Fred!';
switch (''value'')
{
case "''match1''" : '' PHP statements''
break;
case "''match2''" : '' PHP statements''
break;
case "''match3''" : '' PHP statements''
break;
case "''match4''" : '' PHP statements''
break;
case "''match5''" : '' PHP statements''
break;
default :
break;
}