Hi there,
I have an array which looks like
Array
(
[438044691:maincategoryone] => Array
(
[0] => Array
(
[id] => 438044692
[name] => main category one item one
[category] => Array
(
[2] => Array
(
[id] => 4380444456
[name] => main category one item one - sub
)
)
)
[1] => Array
(
[id] => 438044693
[name] => main category one item two
)
)
[438044701:maincategorytwo] => Array
(
[0] => Array
(
[id] => 438044702
[name] => main category two item one
)
)
[438044709:maincategorythree] => Array
(
[0] => Array
(
[id] => 438044710
[name] => main category three item one
)
[1] => Array
(
[id] => 438044711
[name] => main category three item two
)
)
)
How do i loop through this in PHP and store the data in a parent-child-grandchild relationship within the same table (MYSQL).
Also An example query to retrive the data in order (parent-child-grandchild) once inserted would be great.
Hope my question makes sense. If not please excuse me, but i'll be able to give you more information.
Many thanks.