hi coul someone please tell me why the following just goes on to time out :
$mon = 4;
$year = 2005;
$cd2 = 31;
while (!checkdate($mon,$cd2,$year)){
$cd2 = $cd2 - 1;
}
echo $cd2;
any ideas? i'm basically trying to get it to identify the last valid date of a given month...