Attempting to change includes with different specific date. Would something similar to the work:

if (date('m/d/Y') < date('m/d/Y', strtotime("01/10/2011"))) {
    //Display something
else if (date ('m/d/Y') >= date('m/d/Y', strtotime("01/10/2011")) && date ('m/d/Y') <= date("m/d/Y', strtotime("05/10/2011"))           
    // Display something else
else {
    //Display something different

Should i be comprehending the strtotime function properly, I'd decipher it works. But I'm not so i am understanding it properly. Tell me!

You need to compare timestamps (what if (time() < strtotime('2011-01-01')) { /* include something */ } and strtotime return) rather than strings (what time returns).

Such as this:


Edit: also, use single quotes when you do not need php to parse them. They work slightly faster.

[cde] returns a string, when comparing the return values of this function, you're evaluating strings. String comparison of dates within the 'm/d/Y' format doesn't compare the dates the way in which you are planning on (however, should you used the standard format it might).

It is best to compare the timestamps directly:


date returns a string like 2011-01-26, that you simply can't rival another string like 2011-02-23 with any helpful result. You have to compare timestamps as created by strtotime or time:

if (time() /* (now) */ < strtotime('2011-01-26')) ...