How to Calculate the Last Day of the Month in PHP

Author: , April 24th, 2012

$lastDay = date(“Y-m-t”, strtotime(“-3 months”)); $firstDay = date(“Y-m-01”, strtotime(“-3 months”));