I have a table below in MYSQL
Mmeber_Email---------------Member_Name------Data---
mike01@yahoo.com -------- Mike ---------- 100 ------
jacknick@gmail.com --------Jack -----------50 ----
jillwag@hotmail.com -------Jill ---------- 75 ------
jnash@gmail.com -------- John ---------- 10 ------
Now, I have managed to extract the data from the database using PHP. but i don't know how to email the data of each member on their respective email using PHP Mail function. How should i tackle the problem of sending emails to multiple recipients using the PHP mail function below i.e Mike Should get the email containing the message 100, Jack 5 and so on..
<?php
$to = "somebody@example.com";
$subject = "My subject";
$txt = //data extracted from database using a common query comes here
$headers = "From: webmaster@example.com";
mail($to,$subject,$txt,$headers);
?>