Answer the question
In order to leave comments, you need to log in
How to parse product catalog sections?
You need to parse sections into an array of this format:
id | caption | link | parent_id | last
id - Numbering of sections
caption - Product name
link - link
parrent_id - Id of the parent (for example, the section "Jackets" can be included in the section "Outerwear" with id 5, then parrent_id = 5)
last - whether the section is the last, deepest ( there are no further sections, only goods)
The problem is this:
If the depth of the sections was exact, for example 3, then there should be 3 cycles
foreach() {
foreach() {
foreach() {
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question