PHP Date Exercises : Increment date by one month
PHP date: Exercise-24 with Solution
Write a PHP script to increment date by one month.
Sample date : 2012-12-21
<?php $dt = strtotime("2012-12-21"); echo date("Y-m-d", strtotime("+1 month", $dt))."\n"; ?>
PHP Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?