time format with switch case php code example
Example 1: php switch
$age=20;
switch ($age) {
case 19:
echo "Age is 18";
break;
case 20:
echo "Age is 20";
break;
case 21:
echo "Age is 21";
break;
}
Example 2: dualcase php switch
case 'car':
case 'ferrari':
print("car or ferrari");
break;