Answer the question
In order to leave comments, you need to log in
How to make an algorithm for displaying dropdown lists?
Hello!
I have a database with a table like this:
Id | Title | Path
1 | Главное | /
2 | Новости | /1
3 | О нас | /1
4 | Новости о спорте | /1/2
....
1231 | Спортивное питание | /1/2/621/521/531/251
и т.д
Answer the question
In order to leave comments, you need to log in
Add parent_id column
select all data
build tree and pass to template engine
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question