This is useful when you are playing with date and time.This is very short solution for it.
Below example is showing how to add 1 month in current date.
Suppose current date is 2016-05-25 10:33:19 and new date should be 2016-06-25 10:33:19
$today = date("Y-m-d h:i:s");// current date $datemonth = strtotime(date("Y-m-d h:i:s", strtotime($today)) . "+1 month"); $after_month = date('Y-m-d h:i:s', $datemonth);