Help required for php two dimensional array

Hello, I need help in two dimensional arrays.
I have a table in MYsql database with 3 fields

Date, taskid and no. of hours …like

03 feb, 2011 - taskid 01 - 2 hrs
03 feb, 2011 - taskid 01 - 4 hrs
03 feb, 2011 - taskid 02 - 3 hrs
03 feb, 2011 - taskid 02 - 5 hrs

04 feb, 2011 - taskid 01 - 1 hrs
04 feb, 2011 - taskid 01 - 3 hrs
04 feb, 2011 - taskid 02 - 6 hrs
04 feb, 2011 - taskid 02 - 3 hrs

now i want data to display this data in two dimensinal array like

Task 03 Feb, 2011 04 Feb, 2011

taskid 01 6 hrs(2+4) 4 hrs (3+1)

taskid 02 8 hrs 9 hrs

Pls help me :slight_smile: thanks

Hi there,

Is the example data exactly the format each of the fields are in? and is it uniform (i.e. they will always be the same except for numerical changes rather than different words in different places)

Sponsor our Newsletter | Privacy Policy | Terms of Service