I have a text file I am reading from. The main goal is to display the information from the text file into an html table. The information for me is reading okay however all the information is being displayed into the same row.
Current code: Table Headers
<tr>
<th>Title</th>
<th>First Name</th>
<th>Last Name</th>
<th>Date of Birth</th>
<th>Social Number</th>
<th>Address</th>
<th>Email</th>
<th>Phone Number</th>
</tr>
<?php
if(!file_exists("patientdata.txt"))
{
echo "The file from above cannot be found!";
exit;
}
$fp = fopen("patientdata.txt", "r");
if(!$fp)
{
echo "File cannot be opened";
exit;
}
echo "<table border = 3>";
while(!feof($fp))
{
$info = fgets($fp);
echo "<td>$info</td>\n";
}
echo "</td>\n";
echo "</table>";
fclose($fp)
?>
</body>

file_get_contents()