Ebola
02-18-2007, 12:47 AM
if(($ExpDate >= $From) && ($ExpDate <= $To)){
From: 20060308 | To: 20060312 | ExpDate: 20060310
This if statement above was giving me false until I figured out that I had to multiply From, To, and ExpDate by 1 in order to force them to be ints, but shouldn't it have given me true from the beginning even if it was a string?
This is more a question on how php deals with strings/ints moreso than help, because I no longer have the problem.
If it helps I formed the From/To variables like this:
$From = $Year . $Month . $Day;
From: 20060308 | To: 20060312 | ExpDate: 20060310
This if statement above was giving me false until I figured out that I had to multiply From, To, and ExpDate by 1 in order to force them to be ints, but shouldn't it have given me true from the beginning even if it was a string?
This is more a question on how php deals with strings/ints moreso than help, because I no longer have the problem.
If it helps I formed the From/To variables like this:
$From = $Year . $Month . $Day;