PDA

View Full Version : How do I show PHP in the sidebar? Code inside.


Evo-L
02-19-2012, 11:47 PM
Hello, I do not understand how to show PHP in my sidebar. This is the code I have, and it should work but doesn't. Can anyone help me figure out why? I have selected the "PHP" option within the sidebar block options.

<?php
$images = array(
'<a href="http://www.linkedsite.com/" target="_blank"><img src="myimagesdirectpath/img.png" alt="linkedsitename" /></a>',
'<a href="http://www.linkedsite.com/" target="_blank"><img src="myimagesdirectpath/img.png" alt="linkedsitename" /></a>',
'<a href="http://www.linkedsite.com/" target="_blank"><img src="myimagesdirectpath/img.png" alt="linkedsitename" /></a>'
);

shuffle($images);
?>
<divclass="ad">
<?php echo implode('<br />', $images);?>
</div>