We can utilise the second argument of strtotime
to specify the date to calculate “last Friday” and other relative dates from:
<?php echo date("Y-m-d H:i:s", strtotime("last Friday", strtotime("2016-01-11")); ?>
Similarly,
<?php echo date("Y-m-d H:i:s", strtotime("-10 days", strtotime("2016-01-11"); ?>
Cheers!