function to show time passed since event
| From: | Chris W. Parker | Date: | Wed, 08 Oct 2003 23:34:30 +0000 |
| Subject: | function to show time passed since event | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-165539@lists.php.net to get a copy of this message | ||
Hiya.
Tried searching google with no luck on this one.
I'd like a function that when passed a time will spit back in plain
english how much time has passed.
i.e.
You logged in "one hour ago".
<?php
echo "You logged in ".timepassed('2002-08-05 11:24:52').".";
?>
Anyone got da hookup?
Thanks,
Chris.
p.s. Now with signature!
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/