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
If you have a month wise get the last date of the month then,
public function getLastDateOfMonth($month) { $date = date('Y').'-'.$month.'-01'; //make date of month return date('t', strtotime($date)); } $this->getLastDateOfMonth(01); //31