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.

Also Read This ๐Ÿ‘‰   PHP Pagination demo โ€“ Pagination in PHP with example script

Example 1: PHP Added Year to Date


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



don’t miss : Add Months To Date

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.