Hello, I've been puzzling for half a day, I can't connect all 2 arrays of a parent and a child. there are arrays
Parent
[0] => Array ( [id] => 15 [title] => Название )
Child
[0] => Array ( [id] => 1 [parent] => 15 ) [1] => Array ( [id] => 2 [parent] => 15 )
How to add the [child] key with the contents of the $ child array to the $ parent array, taking into account that $ parent ['id'] should be equal to $ child ['parent']
From this example, it should be so
[0] => Array ( [id] => 15 [title] => Название [child] => Array ( [0] => Array ( [id] => 1 [parent] => 15 ) [1] => Array ( [id] => 2 [parent] => 15 ) ) )