PDA

View Full Version : Help! Babe/Picture of the Day Script



excalibursp
10 Jan 2006, 09:16 AM
I need some help with this picture of the day page I've been working on. First off I'm more of a designer than a developer, so I'm having a bit of trouble with this.

I've got this working for 31 days based on DAY OF THE WEEK. But I can't figure out how to do it year round. Any ideas?

Here's the page:
http://www.regalthreads.com/Babe2.php

Thanks in advance for the help!

bigNoodle
10 Jan 2006, 09:46 AM
are you using date(j)?

try this:

<img src="babe<?php printf("%003s\n", date("z")); ?>">
'z' returns the day of the year and the rest pads the number to 3 digits with leading zeroes