PDA

View Full Version : Getting number of days for last month


kjc
07-19-2002, 03:41 PM
Does anyone know how to get the number of days for the last month?

using th date function i can get days for this month
date("t");

Any ideas

Kjc

Mouldy_Goat
07-19-2002, 07:33 PM
Think this should do the trick:
print date("t", mktime(0,0,0, date("n") - 1));

Worth testing though..