array_filter() gibt es. Um aber den Wert einfliessen zu lassen, muss man sich $GLOBALS[] bedienen
PHP:
<?php
$data = array(
array(
'player' => 'live_:)',
'frags' => '2',
'deaths' => '1',
'score' => '5',
'ping' => '60',
'team' => '1'),
array(
'player' => 'kSd||Scream',
'frags' => '0',
'deaths' => '1',
'score' => '0',
'ping' => '44',
'team' => '1'),
array(
'player' => 'borys',
'frags' => '1',
'deaths' => '2',
'score' => '17',
'ping' => '44',
'team' => '2')
);
$team = 1;
$filteredArray = array_filter($data, create_function('$a', "return \$a['team'] == {$team};"));
//Summe aller ges_bestand ermitteln
echo array_sum(array_map(create_function('$e', 'return $e["score"];'), $filteredArray));
?>