get matchinfo #112

Merged
OpzekerIT merged 22 commits from dev into main 2023-11-14 21:38:18 +00:00
Showing only changes of commit f8655d78ab - Show all commits

View file

@ -19,7 +19,7 @@ if (isset($_GET['matchid'])) {
// Loop through the JSON data to extract player stats // Loop through the JSON data to extract player stats
foreach ($jsonData['included'] as $includedItem) { foreach ($jsonData['included'] as $includedItem) {
if ($includedItem['type'] == "participant"){
$playerStats = $includedItem['attributes']['stats']; $playerStats = $includedItem['attributes']['stats'];
echo "<tr>"; echo "<tr>";
echo "<td>" . htmlspecialchars($playerStats['name']) . "</td>"; echo "<td>" . htmlspecialchars($playerStats['name']) . "</td>";
@ -28,7 +28,7 @@ if (isset($_GET['matchid'])) {
echo "<td>" . htmlspecialchars($playerStats['timeSurvived']) . "</td>"; echo "<td>" . htmlspecialchars($playerStats['timeSurvived']) . "</td>";
echo "<td>" . htmlspecialchars($playerStats['winPlace']) . "</td>"; echo "<td>" . htmlspecialchars($playerStats['winPlace']) . "</td>";
echo "</tr>"; echo "</tr>";
}
} }
echo "</table>"; echo "</table>";