Getting Relative Dates

// "Last Sunday" gets the sunday of the current week
// "This Sunday" gets the sunday of the current week until the actual date is a wednesday
// "Next Sunday" gets the next sunday no matter what day you are on

//last sunday
echo date("Y-m-d", strtotime("last Sunday"));

//two weeks ago sunday
echo date("Y-m-d", strtotime("last Sunday -1 weeks"));

// two weeks ago sunday plus a day. the second example is just to show that you can stack up the added or subtracted dates in case you need to do so
echo date("Y-m-d", strtotime("last Monday -1 weeks"));
echo date("Y-m-d", strtotime("last Sunday -1 weeks +1 days"));