Forum Moderators: coopster
if ($row = mysql_fetch_array($result)) {
echo "<table width='95%>";
do {
$id = $row['ID'];
$text = $row['text'];
echo "<tr>
<td>Here is the text - " . $text . "</td>
<td>The ID of the text is - " . $ID . "</td>
<td>The ID of the previous entry is - " . $x? . "</td>
</tr> ";
}
while($row = mysql_fetch_array($result));
echo "</table>";
};
$x = 0;
while($row = mysql_fetch_array($result)) {
$ID = $row['ID'];
$text = $row['text'];`
echo "<tr>
<td>Here is the text - " . $text . "</td>
<td>The ID of the text is - " . $ID . "</td>";
if($x !== 0) {
echo "<td>The ID of the previous entry is - " . $x? . "</td>";
}
else {
echo "<td> </td>";
}
echo "</tr>";
$x = $row['ID'];
}