Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Day of the week of First day of the month 1

Status
Not open for further replies.

tektipsismyfavorite

Technical User
May 4, 2006
57
0
0
US
How do I get the first day of the week's day integer (0 for Sunday and 6 for Saturday) for a particular month?

php manual says date("w") returns today, but how do I return the first day of June, 2006 or something?
 
tektipsismyfavorite,

I am a little confused about what exactly your asking. However, I am going to make an attempt, First try this for other date options. . If your looking for how to print Monday - Sunday try echo date("1"); This returns Monday... and so on.

imryn
 
Code:
$date = "2006-06-01";
echo date("w", strtotime($date));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top