Jamz Posted February 25, 2011 Share Posted February 25, 2011 Hi Guys, Been a while since I've been on here, but I'm currently bashing my head against a wall trying to figure this one out. Basically I have a calendar that outputs Monday through Sunday, and the user clicks on a date and outputs it to the URL.... ie. ?day=$day&month=$month&year=$year. Now the next part I need to find out what day (0-6) say the 25th Feb 2011 will be wday 5... now how can I do this in code? And before anyone says why not output it to url, I cannot as the first week and last weeks use different code Cheers James Link to comment https://forums.phpfreaks.com/topic/228843-date-get-wday-from-daymonthyear/ Share on other sites More sharing options...
MatthewJ Posted February 25, 2011 Share Posted February 25, 2011 date('w', mktime(0,0,0,$month,$day,$year)); Link to comment https://forums.phpfreaks.com/topic/228843-date-get-wday-from-daymonthyear/#findComment-1179729 Share on other sites More sharing options...
Jamz Posted February 25, 2011 Author Share Posted February 25, 2011 You are a legend! Spot on, didnt think it would be so easy. Link to comment https://forums.phpfreaks.com/topic/228843-date-get-wday-from-daymonthyear/#findComment-1179734 Share on other sites More sharing options...
MatthewJ Posted February 25, 2011 Share Posted February 25, 2011 Glad I could help Link to comment https://forums.phpfreaks.com/topic/228843-date-get-wday-from-daymonthyear/#findComment-1179736 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.