Unix timestamp>

1 Cevap

Possible Duplicate:
Unix timestamp to days, hours, minutes

So, I have a field in my users table named last_active which updates every time a user reloads a page. It's stored in unix timestamp.

I would like to output it like this:
Last activity: 4 d 18 h 19 m ago

Nasıl bir PHP ile ki?

Teşekkür ederim.

1 Cevap

Bu makaleye göz atın, bu tam olarak neye ihtiyacınız var

http://blog.fedecarg.com/2009/06/25/format-a-time-interval-with-the-requested-granularity/