... $str .= $a2[$i]>1 ? 's' : '';
if($str!='') break;
}
return $str.' ago';
}
If you want the first 4 words but minified (eg. "1 week and 2 days ago"):
function getTimeAgo($p) ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.