title: php check if date entered is weekend
body: <p>I have a jquery ui datepicker with the weekends blocked off so people can't click them. I know you should never trust the users input and as the box can still be typed in they can still enter weekends. I tried this in php</p>
  
  <pre><code>if(date('w', strtotime($date)) == 6 || 'w', strtotime($date)) == 0)))) {
  echo 'Event is on a weekday'; 
  } else {
  echo 'Event on a weekend';
  }
  </code></pre>
  
  <p>Essentially, the or ||'s aren't actually being accessed for sundays (0) and it's only actually using saturday as the date.</p>
  
  <p>can someone help?</p>
  
  <p>thanks</p>