我正在用 PHP 构建一个传销软件,它的一个功能是统计下线性能。它从父子关系创建一个数组,如下所示。如何通过第五级获得我的孩子及其孙辈的表现(数组键:积分)?
Array
(
[children] => Array
(
[0] => Array
(
[id] => 1
[name] => Medvedev
[email] =>
[points] => 7
[children] => Array
(
[0] => Array
(
[id] => 3
[name] => Putin
[email] =>
[points] => 4
[children] => Array
(
[0] => Array
(
[id] => 5
[name] => Nathan
[email] =>
[points] => 3
)
[1] => Array
(
[id] => 7
[name] => George
[email] =>
[points] => 666
)
)
)
[1] => Array
(
[id] => 4
[name] => Lucas
[email] =>
[points] => 43
)
)
)
)
[id] => 27
[name] => Boss
[email] =>
[points] => 99999
)