How To Subtract Seconds To Current Date Time In Php?

PHP

Nicesnippets

2093

29-12-2020


Hi Guys,

In this example,I will learn you subtract seconds to current date time in php.you can easy and simply subtract seconds to current date time in php.

we will show subtract seconds in current date time php.this tutorial will give you example of subtract seconds to current date time using php.

Example:


<?php

$date = date('Y-m-d H:i:s', strtotime('-15 seconds'));

echo $date;

?>

Output:

2020-12-29 10:18:26

It will help you...