View Single Post
Old 2006-08-18, 06:26 PM   #3
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
The first thing I see is your opening tag, you have <php? where it should be <?php

The second thing I see is that you could do things a little easier...

Code:
<?php

$banner_array = array(
  'Sunday' => 'http://www.japamor.com/banners/ferrocash/sfs/200x250_001.gif',
  'Monday' => 'http://www.japamor.com/banners/ferrocash/sfs/200x250_002.gif',
  'Tuesday' => 'http://www.japamor.com/banners/ferrocash/sfs/200x250_003.gif',
  'Wednesday' => 'http://www.japamor.com/banners/ferrocash/sfs/200x250_004.gif',  'Thursday' => 'http://www.japamor.com/banners/ferrocash/sfs/200x250_005.gif',
  'Friday' => 'http://www.japamor.com/banners/ferrocash/sfs/200x250_006.gif',
  'Saturday' => 'http://www.japamor.com/banners/ferrocash/sfs/200x250_001.gif'
  );

$today = date("l");
?>
html here
<p>
<img src="<?php echo $banner_array[$today];?>">
Not that I particularly like that solution -- I would probably write a quick cron job to copy the right banner into place. Alternatively, you could consider using phpadsnew which would allow you to do all sorts of banner management.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote