PHP code date is not working well : <p>For some strange reason, my php code is displaying a wrong value.
I am trying to display the day of the week.</p>

<p>When using the following code <code>&lt;?php echo date('w');?&gt;</code> it is displaying 0, which is right for Sunday.</p>

<p>But when using the following code, it is dispalying 5 (Friday) for some reason.</p>

<p>What am I missing?</p>

<pre><code>&lt;?php $weekday = date('w'); ?&gt;
&lt;?php if ($weekday &gt;= 1 &amp;&amp; $weekday &lt;= 4) : ?&gt;
&lt;li class="usp-list-checkout first"&gt;
    &lt;a class="usp-link" href="/url"&gt;It's day 1 - 4&lt;/a&gt;
&lt;/li&gt;
&lt;?php elseif ($weekday = 5) : ?&gt;
&lt;li class="usp-list-checkout first"&gt;
    &lt;a class="usp-link" href="/url"&gt;It's day 5&lt;/a&gt;
&lt;/li&gt;
&lt;?php else : ?&gt;
&lt;li class="usp-list-checkout first"&gt;
    &lt;a class="usp-link" href="/url"&gt;It's day 6 or 7&lt;/a&gt;
&lt;/li&gt;
&lt;?php endif; ?&gt;
</code></pre>
