PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
// TEST
$date_due = '2009-10-03';
echo 'date due 2 weeks ago' . date($date_due, strtotime('-2 weeks'));// Want this to show 2009-09-19
Is there anyway I can substitute Y-m-d with a variable like above? I want to return a few values based on the current date minus 2 weeks but this doesn’t work and I’m not sure how to approach this other than a timestamp and work it out in seconds.