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

Timestamps in PHP