From 23b7ddac83b71c1d9afcc37613116ce9591f2c31 Mon Sep 17 00:00:00 2001 From: Lanta Date: Wed, 22 Nov 2023 15:31:04 +0100 Subject: [PATCH] if statement --- latestmatches.php | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/latestmatches.php b/latestmatches.php index 71ef2fd..be2bd21 100644 --- a/latestmatches.php +++ b/latestmatches.php @@ -68,18 +68,19 @@ $ogDescription = "Dive into the detailed match stats of DTCH Clan in PUBG. Explo if ($_GET['filter_by_match_type'] !== 'all' && $match['matchType'] !== $_GET['filter_by_match_type']) { continue; } - $date = new DateTime($match['createdAt']); - $date->modify('+1 hours'); - $formattedDate = $date->format('m-d H:i:s'); + } + $date = new DateTime($match['createdAt']); + $date->modify('+1 hours'); + $formattedDate = $date->format('m-d H:i:s'); - $matchType = $match['matchType']; - $gameMode = $match['gameMode']; - $mapName = isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName']; - $kills = $match['stats']['kills']; - $damage = number_format($match['stats']['damageDealt'], 0, '.', ''); - $timeSurvived = $match['stats']['timeSurvived']; - $winPlace = $match['stats']['winPlace']; - echo " + $matchType = $match['matchType']; + $gameMode = $match['gameMode']; + $mapName = isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName']; + $kills = $match['stats']['kills']; + $damage = number_format($match['stats']['damageDealt'], 0, '.', ''); + $timeSurvived = $match['stats']['timeSurvived']; + $winPlace = $match['stats']['winPlace']; + echo " " . $formattedDate . " " . $gameMode . " " . $matchType . " @@ -90,11 +91,11 @@ $ogDescription = "Dive into the detailed match stats of DTCH Clan in PUBG. Explo " . $winPlace . " "; - } - + + } - + } echo "
"; ?>