PHP How to find the time elapsed since a date time? [duplicate]
Most of the answers seem focused around converting the date from a string to time. It seems you’re mostly thinking about getting the date into the ‘5 days ago’ format, etc.. right? This is how I’d go about doing that: $time = strtotime(‘2010-04-28 17:25:43’); echo ‘event happened ‘.humanTiming($time).’ ago’; function humanTiming ($time) { $time = … Read more