+1 month php

$time = strtotime("2010.12.11");
$final = date("Y-m-d", strtotime("+1 month", $time));

4
3

                                    <?php
$months = n; // Here n = …..-2,-1,0,1,2, …..(months to add or subtract)
$years = n;  // Here n = …..-2,-1,0,1,2, …..(years to add or subtract)
echo date('Y-m-28', mktime(0, 0, 0, date('m')+$months, 1, date('Y') + $years));
?>

4 (3 Votes)
0
4.5
2
SabareeshSS 105 points

                                    echo Date("Y-m-d", strtotime("2013-01-01 +1 Month -1 Day"));// 2013-01-31

echo Date("Y-m-d", strtotime("2013-01-31 +1 Month -3 Day")); // 2013-02-28

echo Date("Y-m-d", strtotime("2013-01-31 +2 Month")); // 2013-03-31

echo Date("Y-m-d", strtotime("2013-01-31 +3 Month -1 Day")); // 2013-04-30

echo Date("Y-m-d", strtotime("2013-12-31 -1 Month -1 Day")); // 2013-11-30

echo Date("Y-m-d", strtotime("2013-12-31 -2 Month")); // 2013-10-31

echo Date("Y-m-d", strtotime("2013-12-31 -3 Month")); // 2013-10-01

echo Date("Y-m-d", strtotime("2013-12-31 -3 Month -1 Day")); // 2013-09-30

4.5 (2 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
month in number php php days left in month how to plus month in php php datetime -1 month add 1 month to specific date php date -1 month php php today plus 1 month how to get 1 month after from date php date - 1 day php month name to month n number in php PHP date 1 day put month in numbers php -1 day in php php - 1 month php -1 day from date 1 month in timestamp php month + 1 php php date get month and day php set date month 1 month later today more 1 month php php days in month month in php php date to date 6 month add php date +1day php date 1 month in the future date decrement 1 month in php date - 1 month in php date + 1 month in php php one month back from date php get date after 1 month php date single digit day add 1 month to current datetime php php get date - 1 month how to increamnt 1 month + in php how to get 1 date and all month in php php dateinterval 1 month - 1 day php datetime + 1 month +1 day in date php date PHP - 1 day php current date - 1 month date php with day month add 1 month in date php find date of 1 month old by now php SQL date -1 day Php php get date - 1 day php month in numbers php year and month -1 php new datetime + 1 day date +3 month php php -1 month date - 1 month php add 1 month to datetime php datetime to date day of month of year php php month + 1 PHP in a month date + 1 month php php add 1 month date php date now -1 month day until last day php date now -1 month days on a month php day 1 of the month php php datetime range 1 month days of month in table php php + one month php -1 year and 1 day day + 1 month and - 10 day php date + one month php datetime + 1 day php php date() month -1 php number to month 6 month back from a date in php date + 3 month php how to get the date from one month from now php how to get the one month from the actual day php date -1 day in php date php add 1 month add 1 month in php php date year month day get days in month from given date php + 1day in php date function 31 days month add 1 month in php php should you use +1 month datetime php today + 1 month php days in specific month php date back 1 month date -1 day php php current date = 1 stday of the month php 1 year to date php DateTime("-1 month") or end of march php DateTime("-1 month") or end of month php -1 month or end of month php get array with all month days current date plus 1 month php date + 1 day php php date now - 1 month php get month -1 php datetime +1 day date plus 1 month php php date + 1 year php date + 1 day php date() plus 1 month php date() -1 day after 1 month date php php month -1 date() -1 day php date() php -1 day php 2 month php +1 month php date -1 day php 1 month from now php date now + 1 month php date - 1 day Datetime php +1 month php echo last month php add date 1 month date php add month php display one month set month php get one month dates php create date only in month php not over month php increment month in a dat by 1 substract 1 month php month in english php php date +1 month add 1 mont to current date laravel php month greater then march php 10 below zero value add in php date php seconds in month php new datetime 1 month ago php strtotime plus 1 month get date 1 month later php php date 3 letter month php add one month to date php add one mo strtotime plus 2 months 1 day php date next month php add 1 month to current date php date +1 day add one month to date in php how to add 1 month in php how to get +1 month in php php date more at month add month to current php 1 month from date php php date now 1 month php date 1 month php utc date 1 month php ad one month compare date php php month less than 1 toaday date plus 1 month in php october 2019 add 1 month to date php php sample program that automatically add every first day of the month php make date 1 month more php date + 1month date.now + 1 month php strtotime add month and a day +1 month is working but not date php +1 month is working but not date php? how to add 1 month dynamically php date + 1 month php how to get one month of given date month in date function + 1 month and - 1 day in php php current date + 1 month Date("m", strtotime($old_date . " +1 month")) $month = Date("m", strtotime($old_date . " +1 month")); php add 1 month to date january add 1 month in laravel add 1month in feb using laravel getdate and add 1month in php one month date range php php date add 1 month php date - 1 month php mysql jquery plus 1 day php now plus 1 month php date plus 1 month how to increment from jan to dec in php how to add one month in php add one month php +1 month php
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source