PHP Function – Time Difference or Time Ago function _ago($time_to, $time_from = 0) { if($time_from==0) time(); $rtc = 60*60*24; //ROUND THE CLOCK $total_weeks = 52.177457; //ESTIMATE NO. OF WEEKS $years = (int)((($time_from – $time_to)/(7*$rtc))/$total_weeks); $rem = (int)(($time_from-$time_to)-($years * $total_weeks * 7 * $rtc)); $weeks = (int)(($rem)/(7*$rtc)); $days = (int)(($rem)/$rtc) – $weeks*7; $hours = (int)(($rem)/3600) – […]