Loop through query and output as table in email ($message)

How do I loop through my query and output that data into a table for the email message?

$message = '<html lang="en-US">
<head>
  <title>$subject</title>
</head>
<body>
  <h1>Doggie Draft</h1>
  <p>Team now up to draft is: '.$currentTeam. ' round '.$currentDraftRound. '.' .$currentDraftPick.'</p>
  <p>Team on deck is:'.$nextTeam. ' round '.$nextDraftRound. '.' .$nextDraftPick.'</p>
  <br>
  <h2>Draft Picks</h2>  
  <h2>Last 10 Transactions</h2>
  <table class="table table-condensed table-striped table-hover">
    <thead>
      <tr>
        <th>Transaction Date</th>
        <th>ABL Team</th>
        <th>Player</th>
      </tr>
    </thead>
    <tbody>
      while ($row = mysqli_fetch_array($queryResultTransactions)) {
        <tr>
          <td>'.$row['createDateTime'].' '.$timeZoneSuffix.'</td>
          <td>'.$row['ABLOwnerID'].'</td>
          <td>'.$row['playerName'].'</td>                                   
        </tr>
    </tbody>
  </table>
</body>
</html>';

build the elements outside of building the message then add them in.

Sponsor our Newsletter | Privacy Policy | Terms of Service