Get First date and last Last Date of current month in php.
// Get First date in current month in php.
//echo $first_day = date('Y-m-d', strtotime(date('m').'/01/'.date('Y').' 00:00:00'));
// Get Last date in current month in php.
$last_day = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
echo $last_day;
//echo $first_day = date('Y-m-d', strtotime(date('m').'/01/'.date('Y').' 00:00:00'));
// Get Last date in current month in php.
$last_day = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
echo $last_day;
Comments
Post a Comment