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 225 views
1 answer 233 views
1 answer 269 views
1 answer 170 views
170 views asked Mar 29, 2022 by avibootz
1 answer 208 views
1 answer 210 views
...