Good Day All,

Trying to set up a banner/ad rotator in a custom island.

When i add the code and submit, I get an error message:
?> ?>
Parse error: syntax error, unexpected '<' in /var/www/html/forum/cache_builders/custom/portal_box_109.php on line 2

I put the code in

/* PHP CODE HERE, IF NECESSARY */
<?php
$banner1 = '<a href="http://www.pianosupplies.com/piano/lamps.html" target="_blank"><img src="http://pianoworld.com/wp-content/Store_Stuff/images/thumbs/GPLED22D2thumb.jpg" alt="Piano Lamp LED" title="BANNER1_TITLE"></a>';
$banner2 = '<a href="http://www.pianosupplies.com/piano/scarves.html" target="_blank"><img src="http://pianoworld.com/wp-content/Store_Stuff/images/thumbs/Pashmina_Scarfs_sm.jpg" alt="Music Theme Scarves" title="BANNER2_TITLE"></a>';
$banner3 = '<a href="http://www.pianosupplies.com/piano/Caster_Cups_Piano.html" target="_blank"><img src="http://pianoworld.com/wp-content/Store_Stuff/images/thumbs/Caster-Cups-Mediumthumb.jpg" alt="Caster Cups for Pianos" title="BANNER3_TITLE"></a>';
$banner4 = '<a href="http://www.pianosupplies.com/piano/PianoWire.html" target="_blank"><img src="http://pianoworld.com/wp-content/Store_Stuff/images/thumbs/thumb_MapesWire.jpg" alt="Piano Wire Music Wire Piano Strings" title="BANNER4_TITLE"></a>';
$banners = array($banner1, $banner2, $banner3, $banner4);
shuffle($banners);
?>

Then I ad the snippet to call the code here:


/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF

<div>
<?php print $banners[0] ?>
</div>

Any idea what I'm doing wrong, or what I should do differently?

As always, thank you for any help.

Best,
Frank B.



Founder/Host
Piano World
https://PianoWorld.com
Home of the world famous Piano Forums.
http://forum.PianoWorld.com
88,000+ registered members
Over 2.5 million posts, and growing...