Help with time-based conditionals
I'm in WordPress (don't know if that matters for this particular code) and I'm trying to display various different things between certain dates, and something else outside of those dates.
Here's what I have so far:
<?php $eventheader = getdate() ?>
<?php if ($eventheader[mon] = 2 && $eventheader[mday] > 12 && $eventheader[mday] < 22){ ?>
<?php include (TEMPLATEPATH . '/event-winter.php'); ?> <!-- Winter Cup -->
<?php if ($eventheader[mon] = 3 && $eventheader[mday] > 4 && $eventheader[mday] < 14){ ?>
<?php include (TEMPLATEPATH . '/event-margutti.php'); ?> <!-- Margutti Trophy -->
<?php if ($eventheader[mon] = 3 && $eventheader[mday] > 4 && $eventheader[mday] < 14){ ?>
<?php include (TEMPLATEPATH . '/event-wsk1.php'); ?> <!-- WSK Round 1 -->
<?php } else { ?>
<?php include (TEMPLATEPATH . '/poll.php'); ?> <!-- Any other time -->
<?php } ?>
As anyone familiar with PHP can probably see, it works with just either event-winter.php or poll.php, but I'm the noobiest of noobs and I don't know how to make it choose from a whole list. Does anyone else know or can point me to an informative link?
