title: Add Numbers Together From Mysql Database in PHP
body: <p>I need to add some numbers together that are being pulled from a MySQL table to get a total value.</p>
  
  <p>Currently the issue I have is the numbers being added to the end of a string instead.</p>
  
  <p>e.g:</p>
  
  <blockquote>
    <p>1,2,3,4 becomes 1234 instead of 10</p>
  </blockquote>
  
  <p>Here is what I am using to get the numbers from the database:</p>
  
  <pre><code>$count = mysqli_query($connect, "SELECT QUANTITY FROM Table");
  
  while($row = mysqli_fetch_assoc($count)) {
      $total .= $row['Quantity'];
      //I Have also tried
      $total .= (int)$row['Quantity'];
  }
  
  echo $total;
  </code></pre>
  
  <p>The Quantity Column is set to be an INT in the table so I would have expected it to add together automatically. What am I doing wrong?</p>