Answers for "how can i find 7 days back a adate from a date in php"

PHP
0

add 7 days to date php

$date = "Mar 03, 2011";
$date = strtotime($date);
$date = strtotime("+7 day", $date);
echo date('M d, Y', $date);
Posted by: Guest on April-20-2020
0

how to get n days from today in php

//Simple method how to get the date of tomorrow, yesterday, etc. is to use: 
$tomorrow = date( "Ymd", strtotime( "+1 days" ) ); 
$dayaftertomorrow = date( "Ymd", strtotime( "+2 days" ) ); 
$yesterday = date( "Ymd", strtotime( "-1 days" ) );
Posted by: Guest on June-03-2021

Browse Popular Code Answers by Language