IF loop
| From: | Ron Piggott | Date: | Tue, 10 Apr 2007 21:38:25 +0000 |
| Subject: | IF loop | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-252478@lists.php.net to get a copy of this message | ||
Would someone help me tweak the IF statement below? I am trying to
assign a value to $seasonal_greeting on Good Friday, Saturday and Easter
Sunday.
We had added an extra day's worth of seconds to $Easter_Sunday wondering
if this is why it didn't work on Easter Sunday.
Where I am at today --- the IF loop is assigning a value to
$seasonal_greeting, not the desired results.
Please e-mail me directly any modifications that should be made to these
lines of code below. ron.php@actsministries.org
Thanks, Ron
$current_year=date("Y");
$date_reference=time();
$good_Friday = easter_date($current_year)-24*3600*2;
$Easter_Sunday = easter_date($current_year)*60*60*24;
if ($date_reference >= $good_Friday && $date_reference <=
$Easter_Sunday) {
$seasonal_greeting = "Have a blessed Easter Weekend celebrating Jesus'
love for you on the cross";
}