How to get weekly time e.g from thursday to thursday???

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!

Moderator: General Moderators

Post Reply
hmdnawaz
Forum Newbie
Posts: 14
Joined: Tue Dec 21, 2010 10:55 pm

How to get weekly time e.g from thursday to thursday???

Post by hmdnawaz »

I want to recieve emails on weekly manner from thursday to thursday. For this how can i set the variables to pass to the sql query.
I worte this
$start_date = mktime(0, 0, 1, date("m"), date("j")-7, date("Y"));
but it will calculate date from today.
And I want to recieve emails on every friday morning.
So please write the code for me also write the end date.

Thanks in advance.
User avatar
spamyboy
Forum Contributor
Posts: 266
Joined: Sun Nov 06, 2005 11:29 am
Location: Lithuania, vilnius

Re: How to get weekly time e.g from thursday to thursday???

Post by spamyboy »

I think you want

Code: Select all

strtotime('+7 days', $now)
.
Post Reply