getlast date of month by givend date code example Example: php last day of month $a_date = "2009-11-23"; echo date("Y-m-t", strtotime($a_date));