Add days to a date in PHP

前端 未结 7 1823
情深已故
情深已故 2020-12-15 08:42

Is there any php function available where I can add days to a date to make up another date? For example, I have a date in the following format: 27-December-2011

If I

7条回答
  •  既然无缘
    2020-12-15 09:06

    $registered = $udata->user_registered;
    $registered = date( "d m Y", strtotime( $registered ));
    $challanexpiry = explode(' ', $registered);
    $day   = $challanexpiry[0];
    $month = $challanexpiry[1];
    $year  = $challanexpiry[2];
    $day = $day+10;
    $bankchallanexpiry = $day . " " . $month . " " . $year;
    

提交回复
热议问题