I have a problem getting the date of monday in the current week.
echo date('Y-m-d',strtotime('monday this week'));
When I'm running the above code on my local machine (PHP 5.3) it outputs correctly '2011-03-07', but the same code on my server (PHP 5.2) outputs '2011-03-14' (that's monday next week).
I've tried to run date('W') on both machines and I get the same result (10).
Edit: Any ideas how get this work correctly?
Thanks in advance.
Use
date('Y-m-d',strtotime(date('o-\\WW')));