How to populate multiple table data in html table with both side header (PHP) ?
$query = $db->prepare("SELECT 'cricket' sport, player, score FROM cricket_table WHERE dateby BETWEEN '2020-01-01' AND '2020-03-01'"
UNION ALL
SELECT 'football' sport, player, score FROM football_table WHERE dateby BETWEEN '2020-01-01' AND '2020-03-01'");
$query->execute;
echo '<table><tr>';
while($row = $query->fetch(PDO:: FETCH_ASSOC) ) {
echo ' <th>'.$row['sport'].'</th>
<td>'.$row['player'].'</td>
<td>'.$row['score'].'</td>