title: Get Day of the week from Date PHP
body: <p>I know there have been several posts about this before but i have been unable to get it to work in my case. I just keep getting errors.</p>
  
  <p>I have a date in this format</p>
  
  <p>mm-dd-yyyy </p>
  
  <p>I want to get the day of the week from this. I have tried several methods as suggested on other posts such as converting it before getting the day but have had no luck. I either get the results as if the date I supplied was a dd-mm format or I just get the 1900 date. The function i have been using is </p>
  
  <pre><code>echo date('l', strtotime($datefield));
  </code></pre>
  
  <p>Please can someone give any advice. Let me know if you need any more information.</p>
  
  <p>Thanks</p>