Answers for "how to add years to a current datetime in php"

PHP
5

php date plus days

<?php 
// PHP program to add days to $Date 
  
// Declare a date 
$date = "2019-05-10"; 
  
// Add days to date and display it 
echo date('Y-m-d', strtotime($date. ' + 10 days')); 
  
?>
Posted by: Guest on June-04-2020
1

add a year php

$end = date('Y-m-d', strtotime('+5 years'));
Posted by: Guest on June-24-2020

Code answers related to "how to add years to a current datetime in php"

Browse Popular Code Answers by Language