Possible Duplicate:
Given a time, how can I find the time one month ago
How can I print an hour ago in PHP using Date?
$date=date("Y-m-d H:i:s");
$time(-1, now);
$result=$date.$time;
So If I wanted to say "John visited last "
Would print
John visited last 20th Feb 2012, 17.26
$date = date('Y-m-d H:i:s', strtotime('-1 hour'));
echo 'John visited last ' . $date;