Hi,
Does anyone know how to make a timer like facebooks where it says "2 minutes ago" & "1 hour ago" etc...
+REP for any hel
Lew.
Printable View
Hi,
Does anyone know how to make a timer like facebooks where it says "2 minutes ago" & "1 hour ago" etc...
+REP for any hel
Lew.
If you save the time that the action is done at, then compare it against the current time and finally round the time - you would have a similar sort of idea :)
http://stackoverflow.com/questions/2...nearest-minute
Save the timestamp.. (<?php $time = time(); ?>), then use a relative time function available almost anywhere.. (just Google around) to do it... be aware of timezones also if you've got a script used across many times zones.