Showing Sunday's date when it's not Sunday
So I have the code ready for use when it's Sunday to make a link with that day's date in it. That was easy. However, I would like to have the same date in the link always be until the following Sunday. So that if it's Tuesday, it will still show the previous Sunday's date in the link.
I thought this would do it
$lastWeek = mktime(0, 0, 0, date("m"), date("d")-7, date("Y"));
but that instead just take 7 days away from the current date; which makes sense once I saw what it was doing.
Any help on this problem? I solved my other problem with date and time using PHP, so I thought I could get this but it has me stumped. I don't know where else to go.
Thanks!
Lindsay