good day to all
i have
$d=‘September 19, 2007’;
my problem is, how to add 1 month starting $d…
ex. output 1:
September 19, 2007
October 18, 2007
ex. output 2:
December 7, 2007
January 6, 2008
good day to all
i have
$d=‘September 19, 2007’;
my problem is, how to add 1 month starting $d…
ex. output 1:
September 19, 2007
October 18, 2007
ex. output 2:
December 7, 2007
January 6, 2008
play around with:
[php]$d2=date(‘M d, Y’, strtotime($d.’ + 1 month - 1 day’));[/php]
take a look at http://php.net/strtotime to get it working.
Try
[php]
<?php $d='September 19, 2007'; echo date('F d, Y', strtotime($d.'+1 months')); ?>[/php]
@andyd34: thx for the syntax correction, i never used strtotime nor the month output with english month-names.
thank you all