Just a noob question,
For example I have date 2013-08-01 // 1 August 2013 How do I get same day next month. ex. 2013-09-01 // 1 Sept 2013
Thanks
I'm not a PHP dev, but it seems to me you want DateTime::add
$date->add(new DateInterval('P1M'));
As noted in the documentation though, you need to be careful near the end of a month - adding 1 month to January 31st 2001 ends up with March 3rd, for example. (Not the behaviour I'd choose, but that's a different matter.) If you're always dealing with the 1st of the month, you should be okay.
With using strtotime
echo date("Y-m-d",strtotime('next month',strtotime('2013-08-01')));
You can use the date_add function (procedural) or Datetime::add (OO). Here is an example of each:
$date = new DateTime('2000-01-01');
$date->add(new DateInterval::createFromDateString('1 month'));
or
$date = date_create('2000-01-01');
date_add($date, date_interval_create_from_date_string('1 month'));