pilliy Posted September 2, 2009 Share Posted September 2, 2009 Hey there guys, I'm having a bit of trouble doing something. What I have is a Timesheets page linked to a Unique identifier for each person. The sheet has a Week beginning list as well. I have the days listed Mon-Sun. I was wondering how I could make it so that the Week beginning could assign dates to each of the days (I.e. Week beginning = 1/1/09 so Monday = 1/1/09 and Tuesday = 2/1/09) I've looked around for sample code to help with this but I am unable to find any. Thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/172770-timesheet-help/ Share on other sites More sharing options...
ignace Posted September 2, 2009 Share Posted September 2, 2009 I have the days listed Mon-Sun. I was wondering how I could make it so that the Week beginning could assign dates to each of the days (I.e. Week beginning = 1/1/09 so Monday = 1/1/09 and Tuesday = 2/1/09) You can use an array for that but you would have to use it in reverse order (date first) or you would only get the last week as this will be the last to overwrite Monday through Sunday thus: $days = array('1/1/09' => 'Monday', '2/1/09' => 'Tuesday', ..); Quote Link to comment https://forums.phpfreaks.com/topic/172770-timesheet-help/#findComment-910791 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.