I guess I spoke too soon. Table1 and table2 has a same field called "email" with different datas. The $row seems to override table2 field with table1.
How would I differentiate the two?
Example:
table1
email | msparker@mail.com
table2
email| classparker@mail.com
$teacher_id = $row['teacher_id'];
$teacher_name = $row['name'];
$email = $row['email'];
echo "id: $teacher_id <br>";
echo "name: $teacher_name";
echo "Class email: $email";
echo "Personal email: $email";
}