title: PHP Date Function Seven days previous
body: <p>I am trying to use PHP's Date Function to get the date of 7 days earlier in YYYY-MM-DD format.</p>
  
  <pre><code>date('Y-m-d');
  </code></pre>
  
  <p>when i try </p>
  
  <pre><code>date('Y-m-d-7');
  </code></pre>
  
  <p>i get an error</p>