Answer the question
In order to leave comments, you need to log in
Find parent section and write it to an array?
There is a Subdivision table where there are SubID and ParentID, and there is a Video table where there is a Select. In Select, SubIDs are written (406,407,469 - as an example). As a result, using Select, I need to find all SubIDs in the Subdivision table and display their ParentID parents, merge all repeated ParentIDs, display only unique ones.
The video array looks like this
Array (
[0] => Array (
[name] => Название 1
[select] => Array (
[0] => 406
[1] => 407
[5] => 469
)
)
[1] => Array (
[name] => Название 2
[select] => Array (
[0] => 390
[1] => 396
[2] => 469
)
)
)
Array (
[0] => Array (
[name] => Название 1
[parent_id] => Array (
[0] => 1000
[1] => 1001
)
)
[1] => Array (
[name] => Название 2
[parent_id] => Array (
[0] => 1002
[1] => 1001
)
)
)
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