| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Goodbye little old lady
|
PHP image countdown
I have a banner that needs to countdown - i.e 10 days to go, and then the next day swap it out with 9 days to go etc... I figured I could get todays day, and use that as the name of the image. Can you see why this doesn't work? <?php $today_image = "/i/banner_preview_" . date('1') . ".gif"; if (file_exists('/path/to/image/' . $today_image)) { ?> <a href="URLHERE.html"><img src="<?php echo $today_image ?>"></a> <?php } else { ?> DEFAULT IMAGE IN CASE <?php } ?> |
|
|
|
![]() |