Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

PHP Add Year to Date

//variable date
$date = "2022-02-01";
$newDate = date('Y-m-d', strtotime($date. ' + 3 years'));

//curent date
$newDate = date('Y-m-d', strtotime(' + 3 years'));
Source by www.itsolutionstuff.com #
 
PREVIOUS NEXT
Tagged: #PHP #Add #Year #Date
ADD COMMENT
Topic
Name
9+9 =