Saturday 10 September 2016

How to get next month starting date based on a date in PHP?

$d = new DateTime(date( 'Y-m-d' ));
$d->modify('first day of next month');
echo $d->format('Y-m-d');

No comments:

Post a Comment

Your comment is so valuable as it would help me in my growth of knowledge.