I have a simple thing I'm trying to solve.
I have a date stored in a table, and I'm comparing it to a php generated date.
ie:
if($row['start_date'] < date("Y-m-d")) {
// table stored date larger than php date
echo 'hi';
} else {
// php date larger than table stored date
echo 'bye';
}
This seems ok to me, but
if $row['start_date'] === '2011-09-13' AND date("Y-m-d") === '2011-09-15'.
I end up with:
hi
This could be one of those twilight moments where I think left is right and a greater than symbol is actually a less than. So please help me - why doesn't this work?
strtotime().'2011-09-13' < '2011-09-15'true?<? Probably best to convert to some numeric type (unix timestamp?) and compare that instead.