Forum Moderators: coopster

Message Too Old, No Replies

Need help with if then

         

geniusshack

3:53 am on Mar 1, 2004 (gmt 0)

10+ Year Member



Hi, I need help writing what I imagine is simple if then statement. I'm just picking up PHP so I'm not entirely sure how this should be formated.

Basically, I want certain chunks of content rotated at weekly intervals.

So I want an if/then that does this:

if date equals range then include file x
if date equals range2 then include file y

Thanks so much for the help

jonknee

6:06 am on Mar 1, 2004 (gmt 0)

10+ Year Member



Convert the dates to timestamps, and then do something like:


if ($date > $range_low && $date < $range_high) {
include(file.txt);
} elseif ($date2 > $range_2_low && $date2 < $range_2_high) {
include(file2.txt);
}

jatar_k

12:47 am on Mar 2, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



and Welcome to WebmasterWorld geniusshack

geniusshack

2:51 am on Mar 2, 2004 (gmt 0)

10+ Year Member



Thanks for the help and the welcome :)