$date = '2007/07/28'; $diff = round((time() - strtotime($date)) / 86400); echo $diff." days ago";