php add year to date – How to Add Year to Date in PHP?

php add year to date and display it. The PHP date function is used to format a date. here we can learn to main 2 Examples.

php add year to date

Adding Year to $current_date can be done in many ways. The following source code will php added year to date.

Example 1: PHP Added Year to Date


    $myJoinDt = "2022-02-01";
    $latestDt = date('Y-m-d', strtotime($myJoinDt. ' + 5 years'));
    echo $latestDt;



Free Live Chat for Any Issue

don’t miss : Add Months To Date

Also Read This πŸ‘‰   PHP Split Export convert Multiple Excel Sheet Files

Example 2: PHP Add Year to Current Date


    $latestDt = date('Y-m-d', strtotime(' + 5 years'));
    echo $latestDt;



I hope you get an idea about php add year to date.
I would like to have feedback on my
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Rate this post