Player Stats past Quarter

$player_datas) { if ($key == 'updated') { continue; } if ($key == 'all') { continue; } echo "
"; // if ($key == 'all') { // echo "Stats for $key (minimal 25 matches)"; // } if ($key == 'clan_casual') { echo "Stats for $key (minimal 18 matches) - Clan casual min 2 clan players per match"; } if ($key == 'Intense') { echo "Stats for $key (minimal 18 matches)"; } if ($key == 'Casual') { echo "Stats for $key (minimal 18 matches)"; } if ($key == 'official') { echo "Stats for $key (minimal 18 matches)"; } if ($key == 'custom') { echo "Stats for $key (minimal 8 matches)"; } if ($key == 'Ranked') { echo "Stats for $key (minimal 8 matches)"; } echo ""; echo ""; foreach ($player_datas as $player_data) { if (!isset($player_data['playername']) || is_null($player_data['playername'])) { continue; // Skip this iteration and move to the next } if (in_array($player_data['playername'], $alts)) { continue; // Skip alt players } if ($key == 'all' && $player_data['matches'] < 25) { continue; } if ($key == 'clan_casual' && $player_data['matches'] < 18) { continue; } if ($key == 'Intense' && $player_data['matches'] < 18) { continue; } if ($key == 'Casual' && $player_data['matches'] < 18) { continue; } if ($key == 'official' && $player_data['matches'] < 18) { continue; } if ($key == 'custom' && $player_data['matches'] < 8) { continue; } if ($key == 'Ranked' && $player_data['matches'] < 8) { continue; } $player_name = $player_data['playername']; $deaths = number_format($player_data['deaths'], 0, ',', ''); $kills = number_format($player_data['kills'], 0, ',', ''); $humankills = number_format($player_data['humankills'], 0, ',', ''); $matches = $player_data['matches']; $KD_H = !isset($player_data['KD_H']) || $player_data['KD_H'] === null ? "null" : ($player_data['KD_H'] == "Infinity" ? "∞" : (is_numeric($player_data['KD_H']) ? number_format((float) $player_data['KD_H'], 2, ',', '') : "0")); // or any other default string for non-numerical values $KD_ALL = !isset($player_data['KD_ALL']) || $player_data['KD_ALL'] === null ? "null" : ($player_data['KD_ALL'] == "Infinity" ? "∞" : (is_numeric($player_data['KD_ALL']) ? number_format((float) $player_data['KD_ALL'], 2, ',', '') : "0")); // or any other default string for non-numerical values $wins = number_format($player_data['wins'], 0, ',', ''); $winratio = number_format($player_data['winratio'], 2, ',', ''); $originalChange = str_replace(',', '.', $player_data['change']); // replace comma with period $change = floatval($originalChange); $ahd = number_format($player_data['ahd'], 2, ',', ''); if ($originalChange < 0) { $imagePath = 'images\red.png'; } elseif ($change > 0) { $imagePath = 'images\green.png'; } else { $imagePath = 'images\equal.png'; } echo ""; } echo "
Player Win % AHD K/D Human Human Kills K/D All Kills Mtchs Wins Deaths Win % change
$player_name $winratio $ahd $KD_H $humankills $KD_ALL $kills $matches $wins $deaths Change Indicator $change
"; } foreach ($players_matches as $key => $update) { if ($key == 'updated') { echo "Last update: $update "; } } ?>