Javascript by Day/Time
Javascript by Day/Time
Out of context: Reply #3
- Started
- Last post
- 12 Responses
- welded0
Not to necessarily suggest PHP over Javascript but it needn't be any more complex than something like this:
<img src="/images/<?php echo date('l'); ?>.jpg" alt="<?php echo date('l'); ?>" /> (hopefully that code doesn't get mangled...)
Basically you can just have a series of images named 'Monday.jpg', 'Tuesday.jpg', etc. and when your page is parsed it'll just work. You can make it fancier and more complicated, but this'll get the job done with a minimum of fuss.
http://php.net/manual/en/functio…