-
Du skal hente datoen:
$tm = mysql_query("SELECT timestamp AS t FROM logs ORDER by id ASC")->fetch_assoc()['t']; //obviously, check the size before you fetch -
Du vil sandsynligvis bruge
strtotime()så for eksempel:$dif = $cur_tm-strtotime($tm); -
$difvil være i millisekunder. -
Hvad laver du med loops og arrays? For forvirrende.