I'm not sure if I'm missing the point entirely here but this definitely makes a little more sense to me than PatrickG's original code (BTW - nice code Patrick and Happy Holodays to all back home! - the code certainly has thrown the cat among the pigeons)kenrbnsn wrote:So, here's a version that works, no infinate loop, date is set, spacing is correct, etc...![]()
Code: Select all
<? $date = date('j F Y',strtotime('today')); if($date<="31 December 2004"){ if($date<="25 December 2004") echo "Merry Christmas and a "; echo "Happy New Year!";} ?>
I've modified this just slighly - as there exists a period of time between the 25th December and 31st December when the original message becomes outdated. So try this:
<?
$date = date('j F Y',strtotime('today'));
if($date<="31 December 2004"){
if($date<="25 December 2004") echo "Merry Christmas and a ";
echo "Happy New Year!";}
else
{echo "Happy New Year!";}
?>
Merry Christamas everyone
- Jackdaw
