Possible Duplicate:
Converting timestamp to time ago in php e.g 1 day ago, 2 days ago
I'm trying to display how old the post is through php. What I'm doing is storing in mysql the php timestamp using the code below.
$timestamp=time();
So then I'm left with a number like this
1334216865
How would I go about changing it so it will say example:
8 seconds ago
If you refresh the page 10 seconds later it will show:
18 seconds ago
I'm not sure how I would convert a timestamp back into time to show my examples.
Thank you