I have a strange issue, where I have a table being populated by info from a database.
When I select from the database, the information comes back exactly as I would expect.
For some reason in my HTML table I have an odd field I can’t see the source off.
My table header row:
echo "<tr>\n";
echo "<th><h3>ID</h3></th>\n";
echo "<th><h3>First Name</h3></th>\n";
echo "<th><h3>Last Name</h3></th>\n";
echo "<th><h3>Odd additional field</h3></th>\n";
echo "<th><h3>Country</h3></th>\n";
echo "<th><h3>Room type</h3></th>\n";
echo "<th><h3>Number</h3></th>\n";
echo "<th><h3>Checkin Date</h3></th>\n";
echo "<th><h3>Nights</h3></th>\n";
echo "</tr>\n";
The field I have called ‘Odd additional field appears even if I take it out, it just isn’t named.
My code to populate the table:
while($row = $sth->fetch()){
echo "<tr url=\"edit.php?id=" . $row['id'] . "\">\n";
echo "<td>" . $row['id'] . "</td>\n";
echo "<td>" . $row['firstName'] . "</td>\n";
echo "<td>" . $row['lastName'] . "</h3><td>\n";
echo "<td>" . $row['country'] . "</td>\n";
echo "<td>" . $row['roomtype'] . "</td>\n";
echo "<td>" . $row['roomnumber'] . "</td>\n";
echo "<td>" . $row['checkin'] . "</td>\n";
echo "<td>" . $row['nights'] . "</td>\n";
echo "</tr>\n";
}
The resultant HTML that goes to the browser:
<table width = "80%" align="center" id="example">
<tr>
<th><h3>ID</h3></th>
<th><h3>First Name</h3></th>
<th><h3>Last Name</h3></th>
<th><h3>Country</h3></th>
<th><h3>Room type</h3></th>
<th><h3>Number</h3></th>
<th><h3>Checkin Date</h3></th>
<th><h3>Nights</h3></th>
</tr>
<tr url="edit.php?id=1">
<td>1</td>
<td>Joe</td>
<td>Schmoe</h3><td>
<td>canada</td>
<td>mdorm</td>
<td></td>
<td>2012-11-16</td>
<td>5</td>
</tr>
</table>
Which all seems fine, and yet when viewing in a browser, this is what I see.

How can I trace this mysterious field?
echo "<td>" . $row['lastName'] . "</h3><td>\n";should be
echo "<td>" . $row['lastName'] . "</td>";