title: PHP mail: Multiple recipients?
body: <p>I have this code:</p>
  
  <pre><code>&lt;?php
  include("db.php");
  
  $result = mysql_query("SELECT * FROM email");
  
  while($row = mysql_fetch_array($result))
  {
  $to = $row['address'];
  }
  $subject = "Test mail";
  $message = "Hello! This is a simple email message.";
  $from = "example@example.com";
  $headers = "From:" . $from;
  mail($to,$subject,$message,$headers);
  ?&gt;
  </code></pre>
  
  <p>In my table ("email") I have multiple addresses.
  (They are not comma sepparated.)
  How could I send my message to all of those addresses?</p>