Skip to content
Advertisement

Tag: hierarchy

Get category tree recursively (Yii)

I have a table with following structure: categories id name parent_id I want to get the tree of categories with single function. I’ve written something like this in my model, but it doesn’t work. Can someone help me with this? Thanks. Answer I’ve finally solved the issue. If someone interested, here’s the code:

Advertisement