$BeginDate = date('Y-m-01', strtotime(date("Y-m-d")));echo $BeginDate;echo "<br/>";echo date('Y-m-d', strtotime("$BeginDate +1 month -1 day"));echo "<br/>";exit;