Hi,
For some reason this has me stumped. Basically I'm calling data from a db and placing it in an array. How do I get the array to write a <tr> for every different "eventid" not evry entry? i.e. Basically the data below should have 2 rows in the table with <td> cells for each of the start dates and jobnames?
Reality is built on a foundation of dreams.
For some reason this has me stumped. Basically I'm calling data from a db and placing it in an array. How do I get the array to write a <tr> for every different "eventid" not evry entry? i.e. Basically the data below should have 2 rows in the table with <td> cells for each of the start dates and jobnames?
Code:
____________________________________________
12345 |2009-03-05 |2009-03-06 |
|Sample Copywrite |Sample Copywrite |
--------------------------------------------
56789 |2009-04-02 | |
|Sample Copywrite2| |
--------------------------------------------
Code:
$yearevent[0] = array("startdate"=>"2009-03-05",
"jobname"=>"Sample Copywrite",
"eventid"=>"12345");
$yearevent[1] = array("startdate"=>"2009-03-06",
"jobname"=>"Sample Copywrite",
"eventid"=>"12345");
$yearevent[2] = array("startdate"=>"2009-04-02",
"jobname"=>"Sample Copywrite2",
"eventid"=>"56789");
Reality is built on a foundation of dreams.