This is supposed to return the information saved in a .txt. file, but it won't work with this error. The error comes up on the closing </body> tag and I don't know why. Can anyone tell me what the error is?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Contacts</title>
</head>

<body>
<h1> My Contacts</h1>
<p align="center">Display the data!</p>
</form>
<?php
if (!file_exists("info.txt") || filesize("info.txt") == 0)
echo "<p>There are no contacts registered.</p>";// if no info entered
else {
$contactsArray= file("info.txt");
sort($contactsArray);
$NameCount= 0;
echo "<table>";
foreach($contactsArray as $record) {
$contact = explode(",",",",",", $record);
echo "<p><tr>";
echo "<td><strong>" . (++$NameCount) . "</strong>.</td>";
echo "<td><strong>Last Name</strong>: ". $Last[0] . "<br/>";
echo "<strong>First Name</strong>: " . $First[1] . "<br/>";
echo "<strong>Address</strong>: " . $Address[2] . "<br/>";
echo "<strong>City</strong>: " . $City[3] . "<br/>";
echo "<strong>State</strong>: " . $State[4] . "<br/>";
echo "<strong>Zip Code</strong>: " . $Zip[5] . "<br/>";
echo "<strong>Area Code $ Phone Number</strong>: " . $Phone[6] . "<br/>";
echo "</td></tr></p>";
}//end foreach
echo"</table>"
?>
</body>
</html>
OOPS. the form is all there now, but the error is still there. I cannot figure this out!!!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Contacts</title>
</head>

<body>
<h1> My Contacts</h1>
<p align="center">Display the data!</p>
<form action="readfile.php" method="get">
<input type='submit' />
</form>
<?php
if (!file_exists("info.txt") || filesize("info.txt") == 0)
echo "<p>There are no contacts registered.</p>";// if no info entered
else
$contactsArray= file("info.txt");
sort($contactsArray);
$NameCount= 0;{
echo "<table>";
foreach ($contactsArray as $record) {
$contact = explode(",",",",",", $record);
echo "<p><tr>";
echo "<td><strong>" . (++$NameCount) . "</strong>.</td>";
echo "<td><strong>Last Name</strong>: ". $Last[0] . "<br/>";
echo "<strong>First Name</strong>: " . $Fir