Re: newbie needs help
| From: | Richard Lynch | Date: | Wed, 02 May 2007 20:24:17 +0000 |
| Subject: | Re: newbie needs help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254267@lists.php.net to get a copy of this message | ||
On Mon, April 30, 2007 3:37 pm, Ben Clapp wrote:
> I am new to PHP programming and need some help. I have an image that i
> have show up each May for the month with $mymonth = date("m",
> mktime()),
> but i want to set up a date range for it to show up. Ex. 4-13 to 5-13
> each year. How can I do that? Any help would be great.
$now = time();
//leave the year off for 'annual' calculations:
if (mktime(1, 0, 0, 4, 13) <= $time && $time <= mktime(1, 0, 0, 5, 13)){
//do something to show your May image.
}
else{
//show the usual image, or nothing, or whatever
}
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?