Trouble echoing table elements
Posted: Wed Dec 26, 2012 7:51 pm
I'm not quite sure what I'm missing, but for some reason the last two close tags "</td>, </tr>" are not closing the second column and first row respectively.
Any help would be greatly appreciated.
Here's the PHP:
Here's the html output from the browser source:
Any help would be greatly appreciated.
Here's the PHP:
Code: Select all
echo ' <tr width="500">
<td width="200"> <img src="'.$item[2].'"/></td>
<td width="300">
<tr>
<td width="150">Picture Name</td><td width="150">'.$item[1].'</td>
</tr>
<tr>
<td width="150">Tag</td><td width="150">'.$item[4].'</td>
</tr>
<tr>
<td width="150">Category</td><td width="150">'.$item[3].'</td>
</tr>
<tr>
<td width="150">ID</td><td width="150">'.$item[0].'</td>
</tr>
<tr>
<td width="150">User ID</td><td width="150">'.$item[5].'</td>
</tr>
<tr>
<td width="150">IP</td><td width="150">'.$item[6].'</td>
</tr>
<tr>
<td width="150">Timestamp</td><td width="150">'.$item[7].'</td>
</tr>
</td>
</tr>';Code: Select all
<tr width="500">
<td width="200"> <img src="pending/test.jpg"/></td>
<td width="300">
<tr>
<td width="150">Picture Name</td><td width="150">2.gif</td>
</tr>
<tr>
<td width="150">Tag</td><td width="150">random funny picture</td>
</tr>
<tr>
<td width="150">Category</td><td width="150">Random</td>
</tr>
<tr>
<td width="150">ID</td><td width="150">2</td>
</tr>
<tr>
<td width="150">User ID</td><td width="150">0</td>
</tr>
<tr>
<td width="150">IP</td><td width="150">127.0.0.1</td>
</tr>
<tr>
<td width="150">Timestamp</td><td width="150">2012-12-25 02:10:29</td>
</tr>
</td>
</tr>