Range in PHPs switch
<p>My teacher gave me this task.</p>

<blockquote>
  <p>Make an <em>int</em> variable that indicates day of the week <em>(1-7)</em>. Make a switch statement with following cases:</p>
  
  <ul>
  <li>1-5 <code>echo "Weekday";</code></li>
  <li>6-7 <code>echo "Weekend";</code></li>
  <li>Other values <code>echo "Unknown day";</code></li>
  </ul>
</blockquote>

<p>My problem is zero.</p>

<p>At first I wrote this code.</p>

<pre><code>$day = 7;

switch ($day) {
    case $day &gt;= 1 &amp;&amp; $day &lt;= 5:
        echo "Weekday";
        break;

    case $day &gt;= 6 &amp;&amp; $day &lt;= 7:
        echo "Weekend";
        break;

    default:
        echo "Unknown day";
        break;
}
</code></pre>

<p>It works works with every number except 0. When <code>$day = 0;</code> it is choosing first case and says it's a <em>Weekday</em>.</p>

<p>I've also tried this.</p>

<pre><code>$day = 7;

switch ($day) {
    case 1-5:
        echo "Weekday";
        break;

    case 6-7:
        echo "Weekend";
        break;

    default:
        echo "Unknown day";
        break;
}
</code></pre>

<p>But it's even worse. I always get the <code>default</code> option.</p>

<p>I know there are better ways to do this, but I need to do it only with a switch statement.</p>