In this article, we will learn how to add years to the current date in PHP its very useful when working on a date and time functionality.
Example
let's add 1 year to the datetime. if you want to another value you can replace 3o to others.
index.php
<?php
$date = date('d/m/Y', strtotime('+1 years'));
echo $date;
?>
Output:
27/01/2022