PHP case switching
PHP – Switch case: Switch case can be considered to be like multiple if else statements. Here, the variable “I” is checked first. If it is evaluated to TRUE, the statement after that is executed else the next if condition is evaluated.
if ($i == 0)
{
echo "i equals 0";
}
elseif ($i == 1)
{
echo "i equals 1";
}
elseif ($i == 2)
{
echo "i equals 2";
}