Happy New Year,

I would like to print articles list ordered/grouped by year column of my db table, but I can't find how I should loop to print something like the following:

   * 2007 (column year)
         o Article 1 (column cat_id)
               + Sub Article 1 (column name with description)
               + Sub Article 2
               + Sub Article 3
         o Article 2
         o Article 3
         o Article 4


To print the above list with the below table data, I need to make all the same year value to one and every articles (column cat_id) should be included in it, but because of my poor knowledge of php and OOP, I couldn't find simple way to loop them.

My table structure looks:

id | type | cat_id | year | name | description ......



Thank you for your help my friends.


---
Enkhbilguun Erdenetsogt

<<attachment: enkhbilguun.vcf>>

Reply via email to