Hello group,
I'm working on a news system. It will allow users to add news etc. But what is most important for me (right now...) is to make good categorization of each news. Categorization means that we can link choosen news to some news categorys (then we will be able to search archive of news by specyfied categorys). Now, I have made in my mysql database something like this:
- Group id
- Main group id
- Group name
So I can add new group and select if it is a new group, or subgroup of some group. For example, right now I have three groups (three records):
Group id | Main group id | Group name
1 |   | Economy news
2 | 1 | Local
3 | 2 | New York
4 | 1 | World
5 | 4 | Poland
And I have a problem with category tree in my php script. The script shoud generate something like this:
- Economy new
   + Local
        New York
   + World
        Poland
It's not a problem to make this if we know how deep category tree is, but when we don't want to limit deepness of the tree it's more complex and I don't know how to do it.
Maybe you will help me.