title: Checking if a date is within 7 days of the current time
body: <p>So I have a php function which interacts with a database and pulls data out. However I have a date stamp (in this case an upload date). I want to make it so that if something has been uploaded within the last 7 days, it posts that to users to make them aware of it being 'new'.</p>
  
  <p>So far I have this:</p>
  
  <pre><code>if( strtotime($rows['Date']) &gt; strtotime('now') ) {
      echo '&lt;div class="l-new"&gt;&lt;a href="#"&gt;&lt;!-- --&gt;&lt;/a&gt;&lt;/div&gt;';
  }
  </code></pre>
  
  <p>The $rows thing is taken care of and works from some other code above this line. But this is the line I am concerned with.</p>
  
  <p>I want to say "if the date in the database is older than the current time, and is less than 7 days old, do the following {
   //echo the stuff about it being new
  }</p>
  
  <p>Problem is, how do I phrase that if statement to make it within 7 days? Absolutely cannot think of how unfortunately. I'm sure it is quite simple! Thank you</p>