I have a page that sends an email to 3 email recipients. The email addresses are currently hard coded. I want to change it so that I don't need to edit the code to change the email addresses (the emails would need to be change about every 2 years). How I want to do this is by pulling the emails from the DB and assigning them each to its own variable. In the DB, I have two columns. A "userId" column and a "email" column. I inserted three different users into the DB. When I run the page, it displays the third email in the DB 3 times rather than the 3 different emails. Do I need to put this in different for loops? What am I doing wrong? Thanks in advance.

**Note:** My email code is currently $to="someone@somewhere.edu"; I want to do away from having to change the emails in the code itself and I prefer to have this done through a variable. So that that the emails in the DB would need to be changed rather than the code having to be edited. 

```
$query = "SELECT email FROM timeSheetEmails WHERE userId='1'";
$query = "SELECT email FROM timeSheetEmails WHERE userId='2'";
$query = "SELECT email FROM timeSheetEmails WHERE userId='3'";
    foreach ($conn->query($query) as $row) {
    $emailOne = $row['email'];
    $emailTwo = $row['email'];
    $emailThree = $row['email'];
echo $emailOne . "<br>";
echo $emailTwo . "<br>";
echo $emailThree;
}​

```