Array
(
[user_id] => 234
[sponsor_id] => 0
[items] => Array
(
[0] => Array
(
[user_id] => 500
[sponsor_id] => 234
[items] => Array
(
[0] => Array
(
[user_id] => 516
[sponsor_id] => 500
)
[1] => Array
(
[user_id] => 533
[sponsor_id] => 500
)
)
)
[1] => Array
(
[user_id] => 501
[sponsor_id] => 234
)
[2] => Array
(
[user_id] => 502
[sponsor_id] => 234
)
[3] => Array
(
[user_id] => 503
[sponsor_id] => 234
)
[4] => Array
(
[user_id] => 504
[sponsor_id] => 234
)
[5] => Array
(
[user_id] => 505
[sponsor_id] => 234
[items] => Array
(
[0] => Array
(
[user_id] => 506
[sponsor_id] => 505
[items] => Array
(
[0] => Array
(
[user_id] => 507
[sponsor_id] => 506
[items] => Array
(
[0] => Array
(
[user_id] => 508
[sponsor_id] => 507
[items] => Array
(
[0] => Array
(
[user_id] => 523
[sponsor_id] => 508
[items] => Array
(
[0] => Array
(
[user_id] => 524
[sponsor_id] => 523
)
)
)
[1] => Array
(
[user_id] => 529
[sponsor_id] => 508
)
)
)
)
)
[1] => Array
(
[user_id] => 509
[sponsor_id] => 506
)
[2] => Array
(
[user_id] => 519
[sponsor_id] => 506
)
)
)
.......
Тоесть в самом начале я должен прогнать по массиву все это дело:
// $users мой массив пользователей с достижениями
foreach($users as $num => $user)
{
// $num - место пользователя
$cl = new Player(new IBehavior,$user, $num);
}