| Posted by Chris B on 05/10/05 22:44 
A mate just solved it with this:
 $timediff = time() - strtotime($lastonline);
 $d = floor(($timediff/86400));
 $remainder = $timediff % 86400;
 $h = floor(($remainder/3600));
 $remainder = $remainder % 3600;
 $m = floor(($remainder/60));
 $s = $remainder % 60;
 
 
 where $timediff = what was $time_since_last_activity
 and $lastonline = what was $last_activity
 
 He modified your version, but without relying on previous values, so
 thanks to you and him.
  Navigation: [Reply to this message] |