Britney Calendar Image |
|
|
Mar 09, 04 | 11:06 pm
On my
other blog, I implemented a super-quick script to display the current image that coincides with my Britney Spears calendar right above the update calendar.
First things first, I had to scan all 12 images from the calendar. I saved each image with it's corresponding three letter month name (i.e.,
Jan, Feb, etc) and the extension
.jpg.
Then, at the top of the page, I assign the current three letter month name to a variable called
$calmonth, by including this line:
<?php $calmonth=date(M); ?>
Using the
PHP date functionML with
M produces the three letter month name.
Wherever I want my Britney image to appear, I put the following:
<img src="path/to/image/directory/<?php echo $calmonth; ?>.jpg">
Whola! Britney all year-round!
Resources:
PHP Date Function
</marcus>