Find if date is less than 7 days from now
<p>How can i find out if expiry date is less than 7 days from now?</p>

<p>The expiry date format looks like this: <strong>2016-04-13</strong></p>

<p>I have a code here, but it doesn't work:</p>

<pre><code>if($record-&gt;$c &lt; date('Y-m-d', strtotime('-7 day'))){
   // this is true
}
</code></pre>

<p>Hope anyone could help me.</p>