How to find first day of the next month and remaining days till this date with PHP

前端 未结 15 792
难免孤独
难免孤独 2020-12-08 14:36

How can I find first day of the next month and the remaining days till this day from the present day?

Thank you

15条回答
  •  Happy的楠姐
    2020-12-08 14:56

    $firstDayNextMonth = date('Y-m-d', strtotime('first day of next month'));
    

    For getting first day after two months from current

    $firstDayAfterTwoMonths = date('Y-m-d', strtotime('first day of +2 month'));
    

提交回复
热议问题