Two variables in one for each

$data = mysqli_query($conn,"SELECT Location,Date,Team1,Team2 FROM database1");

How to include in one foreach loop, Team1 and Team2 as variables $team1 and $team2.
Or how to store the selected items as variables in the foreach.

Use this after execution to save the values
if ($data->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$team1= $row[“Team1”];
$team2= $row[“Team2”];

echo $team1. $team2;
}

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.