How to execute same block of codes for multiple cases of Switch statement in PHP

<?php
$day = 'Saturday';

switch($day)
{
    case 'Saturday':
    case 'Sunday':
        echo 'It\'s a weekend';
    break;
   
    default:
        echo 'Not a weekend';
    break;
}
?>

Comments

Popular posts from this blog

Timus 1209. 1, 10, 100, 1000... accepted solution in C

Timus Problem 1086. Cryptography Accepted Solution in C

Timus 1083. Factorials!!! Accepted Solution in C