Possible Duplicate:
PHP last day of the month
In PHP, I am trying to get the last day of last month. For example, today is December 11 2012. So the date I am then trying to grab is November 30th.
This is what I am currently trying to do:
//this grabs the last daye of this month
$current_month = date('Y-m-t',strtotime('today'));
//this should grab November 30th.
$last_month = date("F, Y",strtotime($current_month." -1 month ")
Instead of it grabbing November 30th, it is grabbing December 1st. Is seems like "-1 month" simply subtracts 30 days.
How do I properly grab the last day of last month?