Thank you, someone had sent me some code that worked on Friday

Ben

Richard Lynch wrote:
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
}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to