I'm trying to learn a little bit of php and can not understand why the 2 second IF is executing here. I have a variable $theDate set to accept a European date 4th May 2010.
$theDate = date('d-m-Y', strtotime("04-05-2010"));
echo "$theDate<br />";
if($theDate > "02-05-2010")
{
echo "Greater than!<br />";
}
if($theDate > "02-05-2011")
{
echo "Why am I showing<br />";
}
echo "Endof";
I just want to use IFs for now, no IF-Else etc. But why is the 2nd IF executing when $theDate is NOT greater than 02-05-2011,
thanks in advance,
Joe