I have this code in PHP:
$Date = date("F j, Y \a\t g:i a");
Where when the user posts something, the date would be set to Month (F) Day (J) and Year (Y) of when the posted. This is an example of the code above, executed:
January 21, 2015 at 10:18 pm
What I am trying to do here is instead of displaying the date, I want it to count the time elapsed since date time posted.
For example, instead of:
January 21, 2015 at 10:18 pm
I want it to be:
Posted 3 minutes ago
Posted 5 hours ago
Posted 2 days ago
Is there anyway i can do this with the current code that I have? I hope this is understandable and someone can help! Thanks!