Jump to content

Timesheet help


pilliy

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/172770-timesheet-help/
Share on other sites

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', ..);

Link to comment
https://forums.phpfreaks.com/topic/172770-timesheet-help/#findComment-910791
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.