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-08-18, 07: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
 

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 04:45 AM.


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