Well, the following returns what date was 5 days ago:
$days_ago = date(\'Y-m-d\', mktime(0, 0, 0, date(\"m\") , date(\"d\") - 5, date(\"Y\")));
I think a readable way of doing that is:
$days_ago = date('Y-m-d', strtotime('-5 days', strtotime('2008-12-02')));