...

View Full Version : Change Unix Timestap to readible



srule_
01-11-2008, 04:40 PM
Hey,

I have the following code:



$timestamp = $row['last_seen'];
$curtime = time();
$lastSeen = $curtime - $timestamp;
echo $lastSeen;


Now only problem is that $lastSeen counts up in seconds, so instead of going to 1:00 mins it goes to 61secs.

Does anyone know of a way to display this time in a more user friendly fashion?

mlseim
01-11-2008, 04:54 PM
See this:
http://us.php.net/time

Death_oClock
01-12-2008, 03:13 AM
The date() function also works excellently, there is a link to it on that page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum