Q:

What is method for getting time and date which less to current date and time

I am new to PHP.
I want to deduct a 2 hour time slot from current date and time to get date and time as output of above query. How do I do this in PHP?

A:

the built in function strtotime is ideal.
<?php
    echo date('d/m/Y H:i:s',strtotime('-2 hours'));
?>

