How would you go about implementing an array design and function to achieve the following table in php. The data would be drawn from a mysql database but i would like to limit the number of mysql queries required and therefore use a formatted array of some sort.
-----------------------------------------
| | 2009 | 2008 | 2007 | 2006 |
-----------------------------------------
| country a | d d | | doc | doc |
| country b | | doc | doc | |
| country c | doc | d d | | doc |
| country d | doc | | d d | |
-----------------------------------------
Where both d & doc are documents. And any date(y) / country can have many documents. The resulting table would be an html table.