Jump to content

Recommended Posts

Hi All,

 

I am making a daily time report management using php and mysql.The database table is created.

 

Now I have to make a html table like below using php and mysql:

 

HTML Code:

 

timeslots            User1          User2      User3       User4    
8-9                      work           work       work        work

9-10                

10-11

...
...
...

17-18

 

8,9,10 are the hours and it will be static.User1..2..3 are coming from the database.and the work done in hour 8 or 9 or 10...will also come from the database for that user.

 

I think here i have to apply 3 dimensional array containing hours and users and work done for that hours.I have all the data stored in the db but the problem is how can i keep the hours,users and work done in a multidimensional array and to display it in the above way.

 

Please suggest any hint as starting point.

 

Thanks,

Raj

Thanks premiso for the array structure.

 

Sorry for late reply.....Can you please tell me if I use array_push function to insert the db values in the array...

 

Also should I start with time then user and then work...can you show me a simple example of how values are manipulated in multidimensional arrays plz.

 

Thanks,

raj

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.