<? function ultimo_dia($mes,$ano) {return strftime("%d", mktime(0, 0, 0, $mes+1, 0, $ano));} echo ultimo_dia(2,2008); //29 ?>