public function getMatchTeams($match_id) { $match_teams_from_db = Match::getMatchTeams($match_id); $result = []; if (count($match_teams_from_db) > 0) { //-- We have teams, get the player info foreach ($match_teams_from_db as $match_team_from_db) { $match_team_id = $match_team_from_db["match_team_id"]; $team_name = $match_team_from_db["team_name"]; if ($team_name == '') { $team_name = self::TEAM_NAME_PREFIX . $match_team_id; } $created_date = $match_team_from_db["created_date"]; //-- Get All $result[] = ['team_name' => $team_name, 'match_team_id' => $match_team_id, 'created_date' => $created_date]; } } return $result; }