How to add 6 months to current date in PHP

1 Answer

0 votes
$currentDate = time(); 
 
$date = strtotime(date("Y-m-d H:i:s", $currentDate) . "+6 months"); 
 
echo date('r', $date); 
 
  
 
 
/*
run:
 
Sun, 25 Sep 2022 07:40:03 +0000
 
*/

 



answered Mar 25, 2022 by avibootz

Related questions

1 answer 134 views
1 answer 141 views
1 answer 197 views
1 answer 107 views
107 views asked Mar 29, 2022 by avibootz
1 answer 138 views
1 answer 133 views
...