I'm struggling to get my timestamp which has been converted to time ago to be displayed within a table. I've seen tutorial on how to have this displayed but haven't came across somebody trying to get it into a table.
<?php
$time = strtotime($tblLobbies['time']);
$dbDate = new DateTime($time);
$currDate = new DateTime();
$interval = $currDate->diff($dbDate);
echo $interval->h." hours ".$interval->m." minutes ago";
while($tblLobbies=mysql_fetch_assoc($records)) {
echo "<tr>";
echo "<td><a href='".$tblLobbies["formLobbyID"]."'>Click here to join Lobby</a></td>";
echo "<td><a href='".$tblLobbies["formSteamID"]."'>".$tblLobbies["formSteamName"]."</td>";
echo "<td>".$tblLobbies["formYourRank"]."</td>";
echo "<td>".$tblLobbies["formRankGroup"]."</td>";
echo "<td>".$tblLobbies["formLobbyType"]."</td>";
echo "<td><img src='".$tblLobbies['formLocation']."' width=\"32\"></td>";
echo "<td>".$tblLobbies["time"]."</td>";
echo "</tr>";
} //end while
?>
Edit:
I'm basically looking to have the Interval be displayed in my table, for each row that is displayed, in the
echo "<td>".$tblLobbies["time"]."</td>";
I hope this helps.
(very new to php sorry if you find this hard to understand as I can't explain well)
Edit:
Have given my own answer below, thank you all for any help given.