PHP Subtract Month from Date Example
In this tutorial, you will learn how to subtract month to date in php. if you have question about how to sub month to current date in php then i will give simple example with solution. let’s discuss about how to sub 1 month to date in php. i explained simply about how to sub month to date in php.
I will give you very simple example how to subtract month to date in PHP. so let's see both example with output:
Example 1: PHP Subtract Month to Date
$date = "2021-11-01";
$newDate = date('Y-m-d', strtotime($date. ' - 3 months'));
Example 2: PHP Subtract Month to Current Date
$newDate = date('Y-m-d', strtotime(' - 3 months'));
i hope it can help you...