This commit is contained in:
Thijs Stobbelaar 2023-11-03 22:09:08 +01:00
parent e4ce1194b4
commit f3cf85cd81

View file

@ -32,8 +32,8 @@ error_reporting(E_ALL);
echo "Stats for $key (minimal 8 matches)"; echo "Stats for $key (minimal 8 matches)";
echo "<table border='1' class='sortable'>"; echo "<table border='1' class='sortable'>";
echo "<tr> echo "<tr>
<th>Playername</th> <th>Player</th>
<th>Win Ratio</th> <th>Win %</th>
<th>K/D (Human)</th> <th>K/D (Human)</th>
<th>K/D (All)</th> <th>K/D (All)</th>
<th>Kills</th> <th>Kills</th>
@ -41,7 +41,7 @@ error_reporting(E_ALL);
<th>Mtchs</th> <th>Mtchs</th>
<th>Wins</th> <th>Wins</th>
<th>Deaths</th> <th>Deaths</th>
<th>Win Ratio change</th> <th>Win % change</th>
</tr>"; </tr>";
@ -75,7 +75,7 @@ error_reporting(E_ALL);
: (is_numeric($player_data['KD_ALL']) : (is_numeric($player_data['KD_ALL'])
? number_format((float) $player_data['KD_ALL'], 2, ',', '') ? number_format((float) $player_data['KD_ALL'], 2, ',', '')
: "0")); // or any other default string for non-numerical values : "0")); // or any other default string for non-numerical values
$wins = number_format($player_data['wins'], 2, ',', ''); $wins = number_format($player_data['wins'], 0, ',', '');
$winratio = number_format($player_data['winratio'], 2, ',', ''); $winratio = number_format($player_data['winratio'], 2, ',', '');
$originalChange = str_replace(',', '.', $player_data['change']); // replace comma with period $originalChange = str_replace(',', '.', $player_data['change']); // replace comma with period
$change = floatval($originalChange); $change = floatval($originalChange);