How To Subtract Year To Current Date In Php?

PHP

Nicesnippets

422

26-12-2020


Hi Guys,

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

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

Example:


<?php

$date = date('d-m-Y', strtotime('-1 year'));

echo $date;

?>

Output:

26-12-2019

It will help you...