I'm not a PHP person, but I think the 'END' block or the three 'less-than' angle brackets (heredoc?) stops PHP being intepreted (code gets ignored)?
Wanted to use the 'Simple Ad Rotator' from PHPBuddy:
http://www.phpbuddy.com/article.php?id=4
Thanks
Keywords: Advertiser Plug-In

Comments
After END; you can add the code (banner_ads.txt must be in the same directory):
$fcontents = join ('', file ('banner_ads.txt'));
$s_con = split("~",$fcontents);
$banner_no = rand(0,(count($s_con)-1));
$run_result .= $s_con[$banner_no];
Your suggestion put the Adverts at the very top of the page (above LogIn toolbar)? But that got me started and I seem to have got it working by getting rid of the 'END' block altogether. Hope that isn't going to cause problems with anything else?
Thanks again
RPR.