In this tutorial you will learn how find PHP date 2 hours ago in a PHP web application.
PHP date hours ago
In this tutorial you will learn how find PHP date 2 hours ago in a PHP web application. The code of "php-date-hours-ago.php" given below :
<?php
$currentDate=date('Y-m-d H:i:s');
echo "Current Date : ".$currentDate;
echo "<br>";
echo " date 2 hours ago : ";
echo date("Y-m-d H:i:s", strtotime ("+2 hour"));
?>
Output :
When run "php-date-hours-ago.php" display output as :


[ 0 ] Comments