How can I get the last day of the month in PHP?
Given:
$a_date = \"2009-11-23\"
I want 2009-11-30; and given
$a_dat
I am using strtotime with cal_days_in_month as following:
$date_at_last_of_month=date('Y-m-d', strtotime('2020-4-1 +'.(cal_days_in_month(CAL_GREGORIAN,4,2020)-1).' day'));