Get last week date in php
<p>Hello, I'm having a problem in my PHP code.</p>

<p>When I run this on my localhost the results is okay but when I upload it on the server it is not the same as on localhost.</p>

<p>I want to get the previous monday (last week) and end of last week (sunday).</p>

<p>This is my code:</p>

<pre><code>$start_past = strtotime("last week"); 
$end_past = strtotime("+6 day",$start_past);

echo $start_past_qry = date("m/d/Y",$start_past);
echo $end_past_qry = date("m/d/Y",$end_past);
</code></pre>

<p><strong>RESULTS ON LOCALHOST</strong>: 
05/06/2013 
05/12/2013</p>

<p><strong>RESULTS ON SERVER</strong>:
05/13/2013
05/19/2013</p>

<p>But the results on the server seems to be fall under the current week.
I want to get the last week range.</p>

<p>Please HELP. Thank you!</p>
