Answers for "subtract two days in php"

PHP
0

subtract some days php

// First date of the month.
$monthFirstDate = date('Y-m-01', strtotime('today'));

// Last date of the month.
$monthLastDate = date('Y-m-t', strtotime('today'));

// Second last date of the month
$monthLastSecondDate = date('Y-m-d', strtotime('-2 day', strtotime('today')));
Posted by: Guest on September-07-2021
3

how to substract multiple dates in php

## CAN GET THE DIFFERENCE DATE BY DAY USING [PHP STRTOTIME FUNCTION]
echo (strtotime(date("2022-03-03")) - strtotime(date("2022-04-03"))) /60/60/24;
Posted by: Guest on April-06-2022

Browse Popular Code Answers by Language