Obtener el último día del mes t devuelve el número total de días del mes en cuestión From http://stackoverflow.com/questions/1686724/php-last-day-of-the-month
$fecha = "2013-11-23"; echo date("Y/m/t", strtotime($fecha));