How to add 5 days to a date in PHP

2 Answers

0 votes
$s = "2022/03/29";  
 
$date = strtotime($s);
 
$date = strtotime("+5 day", $date);
 
echo date('Y/m/d', $date);
 
 
 
 
/*
run:
 
2022/04/03
 
*/

 



answered Mar 30, 2022 by avibootz
0 votes
$s = "Mar 29, 2022";;  
 
$date = strtotime($s);
 
$date = strtotime("+5 day", $date);
 
echo date('Y/m/d', $date);
 
 
 
 
/*
run:
 
2022/04/03
 
*/

 



answered Mar 30, 2022 by avibootz

Related questions

...