Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2006-01-13, 03:19 PM   #6
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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:52 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc