title: How to change background color depending on the day of the week using PHP
body: <p>I need to change the background color of the header box according to the day of the week. For example if the day is Monday or Wednesday the background of the header should be pink, otherwise it should be blue. I found something like this online but it doesn't work. Also I'm not sure where to put the if statement, in the head or the body part? I put this code in the head part and it didn't work.</p>
  <pre class="lang-php prettyprint-override"><code>$t = date(&quot;l&quot;);
  if ($t == 'Monday' || $t == 'Wednesday') {
      echo &quot;&lt;body style='background-color:pink'&gt;&quot;;
  } else {
      echo &quot;&lt;body style='background-color:blue'&gt;&quot;;
  }
  </code></pre>
  <p>Anything I found online was with javascript and I don't know js (I'm very new to coding) so I'm not sure If I should learn and use it or try something else.
  Thanks for the help in advance.</p>