hello!
we print out recordsets from a mysql-db in a html-tabelle. in every recordset we have a field with the unix-timestamp. how can we print out the timedifference (delta t) in a html-table (just seconds needed!) between a recordset an the recordset before?
the code:
echo"<table>\n
<tr>\n
<td>page</td>\n
<td>time</td>\n
<td>ip</td>\n
<td>timestamp</td>\n
<td>delta t</td>\n
</tr>\n";
for($i=0;$i<$num;$i++)
{
$page=mysql_result($select, $i, "page");
$time=mysql_result($select, $i, "time");
$ip=mysql_result($select, $i, "ip");
$timestamp=mysql_result($select, $i, "timestamp"); /here we have the unix-timestamp /
$delta_t="???????";
echo "<tr>\n
<td>$page</td>\n
<td>$time</td>\n
<td>$ip</td>\n
<td>$timestamp</td>
<td>$delta_t</td>\n</tr>\n"; / here we want to print out the timedifference(just seconds needed!) according to the recordset that was printed out before/
}
echo"</table>\n";
many thanks in advance, rainer.