Hello...
I am some confuse with this matter. I want to print a order list with a title in php. those come from my database. Title is my category name and order list should be my subjects. I used 'institute_category_subject' table and i contain all institutes, categories and their subjects. something like this...
+--------+--------------+-------------+------------+
| ics_id | institute_id | category_id | subject_id |
+--------+--------------+-------------+------------+
| 1 | 1 | 1 | 2 |
| 2 | 1 | 1 | 4 |
| 3 | 1 | 2 | 2 |
| 4 | 1 | 2 | 3 |
| 5 | 1 | 3 | 1 |
| 6 | 1 | 3 | 4 |
+--------+--------------+-------------+------------+
I now need to create my list with these values. It is something like this..
category_name1
I. sub1
II. sub2
III. sub3
category_name2
I. sub1
II. sub2
III. sub3 and so on....
My problem is category id with same value going on many rows in the table and when i retrieve that id and when try to print, same category name printing repeatedly. I need to print my category name at only one time as my title and then need to print their subjects as a order list.
any comments are highly appreciated.
thank you..