View Single Post
Old 2006-01-13, 03:19 PM   #7
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
Quote:
I am only getting the "infamous" blank box with red X, and no alt text.
How many pics did you have in the array? Don't forget today is the 13th day of the year so it will show the 13th picture in the array.

Also, you have an extra apostraphe in your first thumb url, this will cause an error.

To just show a pic on a page corresponding to the day of the year:
PHP Code:
<?php 
$pics
=array(
array(
'/images/mypic1.jpg','mypic1 alt text'), 
array(
'/images/mypic2.jpg','mypic2 alt text'), 
array(
'/images/mypic3.jpg','mypic3 alt text'), 
array(
'/images/mypic4.jpg','mypic4 alt text'), 

); 
$today=date('z'); // z gets the day of the year, so need 365 pictures in above array
echo "<img src=\"{$pics[$today][0]}\" alt=\"{$pics[$today][1]}\">"
?>
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.

Last edited by oast; 2006-01-13 at 03:26 PM..
oast is offline   Reply With Quote