优惠券
coupondate
STARTINGDATE
我基于优惠券和STARTINGDATE产生coupondate没有追加。
FOR EX -
如果券= 500501和STARTINGDATE = 24-02-2015
然后coupondate产生象下面..
coupondate = 23-03-2015,23- 04-2015
但我需要追加优惠券与coupondate
FOR EX -
500 - 23-03-2015
501 - 23-04-2015喜欢聪明..
PLZ帮助来获得上述输出
低于是我的代码
$coupon = $_POST['coupon'];
$startingdate = $_POST['startingdate'];
$coupons = explode(',', $coupon);
$dates = Array();
for ($no = 1; $no < count($coupons) + 1; $no++)
{
$dates[] = date("d-m-Y", strtotime($startingdate . " +" . $no . " MONTHS -1 DAYS"));
}
$coupondate = implode(',', $dates);
你能加$ _ POST值[“优惠券”] – 2015-02-24 09:09:23
是的,这也将在数据库中,但在seprate列.... – 2015-02-24 09:16:00
我需要追加$ _ POST [“优惠券”] - 用每个日期 – 2015-02-24 09:17:01