Use a different piece of html for each week of the year

Hi, I’m completely new to php. I’m trying to run little pieces of html depending on which week of the year we currently are on but something is not working. For some reason always show the first option and ignores everything else. Anyone can help me figure out what I’m doing wrong. Again, I’m VERY new at php. This is what I have:

[b]$curweek = date(“W”);

if ($curweek == 07 || 21 || 35 || 49) {

	echo '<p>html 1</p>';

}

elseif ($curweek == 08 || 22 || 36 || 50) {

	echo '<p>html 2</p>';

}

elseif ($curweek == 09 || 23 || 37 || 51) {

	echo '<p>html 3</p>';

}
[/b]
and so on…

It always shows the “html 1” regardless of the week we are on.

Your welcome.

[php]<?php
$curweek = date(“W”);

////////////////////////////////////////////////////////////////
//Test here by changing #. This overwrites the previous line.
// Remove line below when done testing.
$curweek = 50;
////////////////////////////////////////////////////////////////

if ($curweek == 07 || $curweek == 21 || $curweek == 35 || $curweek == 49)
{
echo ‘

html 1

’;
}

elseif ($curweek == 08 || $curweek == 22 || $curweek == 36 || $curweek == 50)
{
echo ‘

html 2

’;
}
elseif ($curweek == 09 || $curweek == 23 || $curweek == 37 || $curweek == 51)
{
echo ‘

html 3

’;
}
?>[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service