Get week's in PHP

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
apg88
Forum Newbie
Posts: 16
Joined: Thu Aug 25, 2005 5:43 pm

Get week's in PHP

Post by apg88 »

Is there a way to get the begginning and end of the week with php?
I know date("W"); gives you the week number, but what I need is something like:
August 6-12
Or July 30 - August 5

Is there an easy way to do this, or do I have to make my own script?

Thanks,

apg88
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Have a read through the date and time functions of PHP in the PHP Manual. You may need to create your own function.
Post Reply