How to Get Next Year From Date In Php?
Hi Guys,
In this example,I will learn you how to get next year from date in php.you can easy and simply get next year from date in php.
we will show you how to get next year from date in php.if you want to get next year from date in php then you can use bellow example.
Example:
<?php
$date = "2020-01-11";
$newdate = date("Y-m-d",strtotime ( '+1 year' , strtotime ( $date ) )) ;
echo $newdate;
?>
Output:
2021-01-11
It will help you...
- How To Use Php Conditional Statement Example
- How to Check if String Contains Regex in PHP?
- PHP Array_column() Function Example
- PHP Generate List of Random Numbers Between 0 and 100 Example
- How to User Login with Facebook in PHP?
- How to Explode Every Character into Array Using PHP Example?
- PHP Form Validation Tutorial
- PHP Convert XML to JSON Example