Array
(
[servers] => Array
(
[4] => Array
(
[address] => xxxx
[protocol] => 48
[hostname] => xxxxx
[appid] => 10
(
[0] => Array
(
[player_id] => 0
[nick] => xxxxx
[score] => 2
[time_int] => 2680
[time_gmt] => 44:40
)
)
)
)
)
function Circumcision($arr, $size) // :-)
{
$arr = array_slice($arr, 0, $size);
foreach($arr as $item)
{
if(is_array($item))
{
$item = Circumcision($item, 1); // привык к ооп, если что я не виноват :)
}
}
return $arr;
}
$input = array("a", "b", "c");
$result = Circumcision($input, 1);