INSERT:<input type="text" name="my">
no of months:<input type="text" name="noofmonths">
<input type="submit" name="sub" value="submit">
点击提交按钮后,我要相应的未来月份/年份。
Eg:INSERT: Septemeber 2015;
no of months:4;
i want an o/p:January 2016;
另一个例如:
Eg:INSERT: December 2015;
no of months:2;
i want an o/p:February 2016;
您可以尝试此代码
假设用户输入此日期
$date = "20 September"; //Your spelling for September is wrong make sure user enter correct spelling
用户在4个月内输入4
echo $effectiveDate = date('F Y', strtotime("+4 months", strtotime($date)));
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句