I am trying to determine if todays date ($today) is within a week
($startcheck) of a given date ($dob). This is what I have so far.
$todaydate = (date("Y-d-m"));
$today = strtotime($todaydate);
// $today prior to strtotime = 2001-10-11
$startcheck = strtotime(2001-08-11);
$dob = strtotime(2001-15-11);
//$today is CLEARLY between the two dates I'm testing with but "no" is
always returned.
if($today <= $dob && $startcheck <= $today) {
print "yes";
}
else {
print "no";
}
Here are the values assigned to the vars, why is $today so much smaller
than $startcheck and $dob?
1002783600 = today
1005452940 = startcheck
1005451980 = dob
win32 php4
Thanks in advance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]