How to calculate relative time PHP

Do you remember the post I wrote about How to calculate relative time like facebook?

The code was a little bit messy so today i’ll show you a short snippet.

In my example I have stored the time in a datetime field in my MySQL database.

Then I’d like to know how many days ago was it.

Easy, right? 😉

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*