Hello! I've only been using PHP for a couple days, and I'm hooked! This is the first problem I've run into:
$current_day = 26;
$xmas_day = 25;
if ($current_day > $xmas_day) {
print "Christmas was " . $current_day - $xmas_day . " days ago... I hope you got something cool!";
}
I get this result:
-25 days ago... I hope you got something cool!
But, If I change the code to:
print "Christmas was ";
print $current_day - $xmas_day . " days ago... I hope you got something cool!";
I get the correct result of:
Christmas was 1 days ago... I hope you got something cool!
Why is this happening? Thanks!