php switch break code example
Example 1: case statement in php
<?php
switch ($i) {
case "apple":
echo "i is apple";
break;
case "bar":
echo "i is bar";
break;
case "cake":
echo "i is cake";
break;
}
?>
Example 2: dualcase php switch
case 'car':
case 'ferrari':
print("car or ferrari");
break;