You should put the content in <td>
elements.
<tr>
<td>myHeader</td>
</tr>
and
echo "<tr>\n<td>";
echo $row->name;
echo "</td>\n</tr>";
Edit: and the browser does rearrange the bad content outside of any tr
in the DOM, that's right, because it doesn't know what to do with the content otherwise. However, I wouldn't know why there are two tbody
elements being created. No clue how that could happen.